1

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 installed 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.

1
  • 1
    Did upgrading Ubuntu also upgrade your ruby version? Check ruby -v to make sure you're not trying to use rails-ruby1.8 with ruby 1.9 Commented May 1, 2011 at 15:44

2 Answers 2

0

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?

Sign up to request clarification or add additional context in comments.

Comments

0

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.

1 Comment

I was using RVM - somehow after updating the system was reverting back to the system install of 2.3.5 instead of using my RVM installations, even after I sudo'ed rvm to use otherwise.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.