开发者

Rails / Rack / Config.ru

开发者 https://www.devze.com 2023-03-12 23:55 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消