INCLUDE_DATA

Upgrading to Rails 2.1 RC1 (with HAML)

Good morning one and all. Here is a step-by-step transcript of how I got my project from Rails 2.0.2 to 2.1 RC1.

1. Remove Rails 2.0.2 from the project and the svn repo:

svn rm vendor/rails
svn commit vendor/rails -m "[REMOVED] Rails 2.0.2 from repo;"

2. Checkout Rails 2.1 RC1 from the git repository, and then move to the 2.1 RC1 branch:

cd vendor
git clone git://github.com/rails/rails.git
cd rails
git checkout v2.1.0_RC1

3. Start the server:

I’m using HAML, so I got this error:

=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
Exiting
/opt/local/lib/ruby/gems/1.8/gems/haml-1.8.2/lib/haml/template/plugin.rb:42: undefined method `register_template_handler' for ActionView::Base:Class (NoMethodError)
	from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
	from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
	from /Users/aeldaly/Documents/clients/code/new_moredating/vendor/rails/activesupport/lib/active_support/dependencies.rb:508:in `require'
	from /Users/aeldaly/Documents/clients/code/new_moredating/vendor/rails/activesupport/lib/active_support/dependencies.rb:353:in `new_constants_in'
	from /Users/aeldaly/Documents/clients/code/new_moredating/vendor/rails/activesupport/lib/active_support/dependencies.rb:508:in `require'
	from /opt/local/lib/ruby/gems/1.8/gems/haml-1.8.2/lib/haml/template.rb:28
	from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
	from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
	 ... 44 levels...
	from /Users/aeldaly/Documents/clients/code/new_moredating/vendor/rails/activesupport/lib/active_support/dependencies.rb:508:in `require'
	from /Users/aeldaly/Documents/clients/code/new_moredating/vendor/rails/railties/lib/commands/server.rb:39
	from ./script/server:3:in `require'
	from ./script/server:3

A quick search on google, led me to this post: http://nex-3.com/posts/76-haml-2-0

So, I proceeded to update to HAML 2. Here goes:

sudo gem update

It updated quite a few gems, and yes, one of them was indeed HAML 2.0.

4. Start server, take 2
No errors!! You should now be running on Rails 2.1 RC1. Congratulations.

5. Commit to svn:

svn add vendor/rails
svn commit vendor/rails -m "[UPDATED] app to Rails 2.1 RC1"