Rolling with Rails 2.0

If you want to try out Rails 2.0 there are (as usual) some gotchas…

First – read through the Preview Release Announcement

Second – install sudo gem install rails –source

Now the gotchas…

If you do a rails myapp that’ll be created with an old rails generator. Something will work, but not everything. Here’s the idiot proof step-by-step

(yes – you need to run rake rails:freeze:edge TAG=rel_2-0-0_PR twice)

sudo gem install rails --source
rails dummy_app
cd dummy_app
rake rails:freeze:edge TAG=rel_2-0-0_PR
rake rails:freeze:edge TAG=rel_2-0-0_PR
cd ..
ruby dummy_app/vendor/rails/railties/bin/rails rails2app
cd rails2app
rake rails:freeze:edge TAG=rel_2-0-0_PR

So – what that does is create a dummy project. Loads rails 2.0 as a plugin. Then uses the generators in Rails 2.0 to generate a new rails project (which you then need to load rails 2.0 as a plugin into again, or do something with linked directories, etc.).

If you don’t do this you’ll get obscure, hard to figure out errors… basic things like scaffolding and default routes won’t work.