I've an existing project in rails2 and I need to upgrade it to rails3.
I heard something about rails-upgrade but not used yet.
When I tried using rails-upgrade check
it generate error like:
$ rails-upgrade check
/usr/lib/ruby/gems/1.8/gems/rails-upgrade-0.0.2/lib/rails-upgrade/upgraders/routes.rb:28: undefined method `cattr_accessor' for RailsUpgrade::Upgraders::RouteRedrawer:Class (NoMethodError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom开发者_运维技巧_require.rb:29:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
from /usr/lib/ruby/gems/1.8/gems/rails-upgrade-0.0.2/lib/rails-upgrade.rb:12
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
from /usr/lib/ruby/gems/1.8/gems/rails-upgrade-0.0.2/bin/rails-upgrade:7
from /usr/bin/rails-upgrade:19:in `load'
from /usr/bin/rails-upgrade:19
Any one please tell me how I can upgrade my app to rails3.
I do the rails upgrades with creating a new rails project into the old one.
During the create procedure you should check the difference between those files that should be overwritten.
For me it was the fastest way to update my rails projects.
精彩评论