It seems like some people here had this problem but I couldn\'t find any solution in another topic.
I am doing Chapter 3 of the Ruby on Rails-Tutorial, working on the sta
your routes.rb file has problems, use either RESTful style:
resource :static_pages do
collection do
get :home
get :help
get :about
end
end
or the non RESTful style:
match "static_pages/home", :controller => "static_pages", :action => "home"
match "static_pages/help", :controller => "static_pages", :action => "help"
match "static_pages/about", :controller => "static_pages", :action => "about"
for more details please refer to official guide: http://guides.rubyonrails.org/routing.html
In
config/routes.rb
uncomment
If you are using Spork you must re-run Spork so your tests will consider the changes in config files like routes.rb, that are pre-loaded with Spork, so are not automatically updated.
Source: this is the source of this information "after changing a file included in the prefork loading (such as routes.rb), you will have to restart the Spork server to load the new Rails environment. If your tests are failing when you think they should be passing, quit the Spork server with Control-C and restart it
From Ruby 2 to Ruby 3 there are some differences, but still the documentation for 3 is not easy to be found. There should be a tutorial only for that: practical differences between rails 2 and 3. The guide provided by downloading Ruby on rails is "The book of ruby" but it's not good anymore. It should at least contain an advice at the beginning of chapter 19.
I had a few problems working through the Rails Tutorial, and it helped to be able to consult the author's GitHub repo: https://github.com/railstutorial
Find the file you're working on and compare it line by line. Or just cut and paste the full file and see if it will run, then track down your error.
If you check the routes.rb in config you'll probably find that the there is a 'e' missing from /home. Add that and you are golden. Or green. Or whatever :)