我試圖產生這樣一個遷移:爲什麼我的遷移中出現「未定義方法write_inheritable_attribute」錯誤?
rails generate migration RemovefromGenotypes box:integer well:string
但後來我得到這個錯誤:
/usr/share/rails-ruby1.8/railties/lib/rails_generator/options.rb:32:in `default_options': undefined method `write_inheritable_attribute' for Rails::Generator::Base:Class (NoMethodError)
from /usr/share/rails-ruby1.8/railties/lib/rails_generator/base.rb:90:in `<class:Base>'
from /usr/share/rails-ruby1.8/railties/lib/rails_generator/base.rb:85:in `<module:Generator>'
from /usr/share/rails-ruby1.8/railties/lib/rails_generator/base.rb:48:in `<module:Rails>'
from /usr/share/rails-ruby1.8/railties/lib/rails_generator/base.rb:6:in `<top (required)>'
from /home/caseyr/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/caseyr/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/share/rails-ruby1.8/railties/lib/rails_generator.rb:34:in `<top (required)>'
from /home/caseyr/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/caseyr/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/share/rails-ruby1.8/railties/bin/rails:14:in `<main>'
我不知道從哪裏開始調試這一點,但如果有人能肯定會欣賞它指向我在正確的方向...
謝謝! --rick
忘了提及:我使用Rails 2.3.5和Ruby版本:ruby 1.9.3p194(2012-04-20修訂版35410)[i686-linux] – rixter
嘗試下劃線版本,所有我可以說remove_column_from_genotypes框:整數好:字符串 – Viren