开发者

Upgrade rails app from 2.2.2 to 2.3.5

How hard/complex would upgrading an application from Rails 2.2.2 to the latest build?

I have seen some rake tasks for upgrading from 1.2 versions etc. but havent seen any comments on a smaller increment upgrade.

Thanks,

Danny

Error after upgrade

macbook:trunk danny$ script/server
=> Booting Mongrel
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
/Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:105:in `const_missing': uninitialized constant Rails::Plugin::OpenIdAuthentication (NameError)
    from /Users/danny/Dropbox/SVN/railsapps/macandco/surveymanager/trunk/vendor/plugins/open_id_authentication/init.rb:16:in `evaluate_init_rb'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in `call'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in `evaluate_method'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in `call'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `each'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `send'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in `run_callbacks'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in `send'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/di开发者_开发技巧spatcher.rb:51:in `run_prepare_callbacks'
    from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:631:in `prepare_dispatcher'
    from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:185:in `process'
    from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
    from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
    from /Users/danny/Dropbox/SVN/railsapps/macandco/surveymanager/trunk/config/environment.rb:12
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
    from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:84
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
    from script/server:3


Install the new gem, change your Rails version, and run your tests. There shouldn't be much, if anything, that needs to change in your code. I can't remember having any major (or minor) issues when moving to 2.3.5.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜