Middleman is a tool for building static websites, but with your own tools like Ruby, Coffeescript and Slim. This will be compiled to html/css/js. It's a great tool but it is not in anyway depended on Rails (4).
Middleman process
It's a gem, to install just type
gem install middleman
Now you can create a new project
middleman init awesomeproject
Now you're ready to build a static website, you can view the changes with the middleman server
middleman server
When you've finished your static website
middleman build
and your website will be compiled to HTML/CSS/JS, which can be placed on any server that you have.
I think you've combined those two things (Middleman with Rails) and this is giving you this wierd error.