当我尝试运行迁移时,我的 Rails 应用程序突然停止工作。例如:
$ rails generate migration AddBalanceToUsers balance:float
/Users/serg/.rvm/gems/ree-1.8.7-head/gems/rails-2.3.5/bin/../lib/rails_generator/options.rb:32:in `default_options': undefined method `write_inheritable_attribute' for Rails::Generator::Base:Class (NoMethodError)
from /Users/serg/.rvm/gems/ree-1.8.7-head/gems/rails-2.3.5/bin/../lib/rails_generator/base.rb:90
from /Users/serg/.rvm/rubies/ree-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
from /Users/serg/.rvm/rubies/ree-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
from /Users/serg/.rvm/gems/ree-1.8.7-head/gems/rails-2.3.5/bin/../lib/rails_generator.rb:34
from /Users/serg/.rvm/rubies/ree-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
from /Users/serg/.rvm/rubies/ree-1.8.7-head/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
from /Users/serg/.rvm/gems/ree-1.8.7-head/gems/rails-2.3.5/bin/rails:14
from /Users/serg/.rvm/gems/ree-1.8.7-head/bin/rails:19:in `load'
from /Users/serg/.rvm/gems/ree-1.8.7-head/bin/rails:19
我用
ree 1.8.7
rails 2.3.5 (but i also have rails 3.2.3)
RVM
OS X Lion