开发者

Rails is broken after upgrading to Ubuntu 11.04

开发者 https://www.devze.com 2023-03-01 17:05 出处:网络
I\'m still relatively new to Rails and Ruby - and after upgrading to the new version of Ubuntu (11.04), my rails installation is not working correctly. I\'ve tried updating Rails, and updating the ver

I'm still relatively new to Rails and Ruby - and after upgrading to the new version of Ubuntu (11.04), my rails installation is not working correctly. I've tried updating Rails, and updating the versions I have in开发者_运维百科stalled using RVM, none of which worked.

Here is the terminal output:

 /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/alec/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /home/alec/.rvm/rubies/ruby-1.9.2-p180/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 <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /usr/share/rails-ruby1.8/railties/bin/rails:14:in `<main>'

From that, I tried updating railties specifically, but that didn't work either. The output hasn't changed since I first received the error.


The issue was that rails reverted back to 2.3.5. I had to uninstall rails and set up a gemset as described here: Every time I close terminal rails defaults back to 2.3.5 from 3.0.3?


I'd recommend you take a look at RVM. It is by far the best way to manage installations of Ruby and Rails on the *NIX platforms.

0

精彩评论

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