0
類
我升級一個Rails 2應用到Rails 3 然後我安裝rails-upgrade
寶石:未定義的方法`cattr_accessor」的RailsUpgrade ::升級的版本:: RouteRedrawer:
$ gem install rails-upgrade --user-install
Fetching: rails-upgrade-0.0.2.gem (100%)
PostInstall.txt
Successfully installed rails-upgrade-0.0.2
1 gem installed
Installing ri documentation for rails-upgrade-0.0.2...
Installing RDoc documentation for rails-upgrade-0.0.2...
然後我跑check
,但它引發了這個錯誤:
$ rails-upgrade check
/home/neoriddle/.gem/ruby/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/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `require'
from /home/neoriddle/.gem/ruby/1.8/gems/rails-upgrade-0.0.2/lib/rails-upgrade.rb:12
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:55:in `require'
from /home/neoriddle/.gem/ruby/1.8/gems/rails-upgrade-0.0.2/bin/rails-upgrade:7
from /home/neoriddle/.gem/ruby/1.8/bin/rails-upgrade:19:in `load'
from /home/neoriddle/.gem/ruby/1.8/bin/rails-upgrade:19
什麼是錯,我該如何解決它?
我已經安裝了Rails 3和所有的依賴需要:
$ rails -v
Rails 3.0.9
$ ruby -v
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-linux]
$ gem list active
*** LOCAL GEMS ***
active_scaffold_vho (3.0.20)
activemerchant (1.15.0, 1.14.0)
activemodel (3.0.9, 3.0.7, 3.0.5, 3.0.3)
activerecord (3.0.9, 3.0.7, 3.0.3, 2.3.11, 2.3.5, 2.2.3, 2.1.2, 2.1.1, 2.0.5, 1.15.3)
activeresource (3.0.9, 3.0.7, 3.0.3, 2.3.11, 2.3.5, 2.2.3, 2.1.2, 2.1.1)
activesupport (3.0.9, 3.0.7, 3.0.5, 3.0.3, 2.3.11, 2.3.5, 2.2.3, 2.1.2, 2.1.1, 2.0.5, 1.4.2)
$ gem list action
*** LOCAL GEMS ***
actionmailer (3.0.9, 3.0.7, 3.0.3, 2.3.11, 2.3.5, 2.2.3, 2.1.2, 2.1.1, 1.3.3)
actionpack (3.0.9, 3.0.7, 3.0.3, 2.3.11, 2.3.5, 2.2.3, 2.1.2, 2.1.1, 1.13.3)
actionwebservice (1.2.6, 1.2.3)
如果你需要更多的Infor請提問。
這並不容易,我還無法獲得完整的解決方案。 – Israel