Rails / Rack / Config.ru
Trying to follow the "Ruby on Rails 3 Tutorial" and running rails s
, getting the following error:
[path]\config.ru:1 in 'require': no such file to load 开发者_如何学C-- fake_app
I've got the location of fake_app.rb
in the PATH (which I presume is what rails/rack is trying to find)
Contents of config.ru
are the default generated:
require "fake_app"
run Rack::Test::FakeApp
I am running rails 3.0.8 and Windows 7
Thanks for helping this complete novice out!
Did you generate this with rails new [appname]
command? A default Rails 3.0 config.ru
file should look more like this:
require ::File.expand_path('../config/environment', __FILE__)
run ApplicationName::Application
If all you've done at this point is install Ruby and Rails, I'd re-run the generator to get something that works.
Also, since you're on Windows, I wanted to recommend Rails Installer for your environment installation and setup. It mitigates a lot of the startup pain.
This is probably the tutorial you are speaking of, but I also highly recommend Michael Hartl's Ruby on Rails Tutorial for a solid introduction to Rails 3. The section about generating your first application may be handy in this situation.
精彩评论