I\'m trying to run Rails 3 beta 4 & Ruby 1.9.2rc on Ubuntu 10.04. It worked initially, but after doing my first bundle install/package, I now get the following errors in
As per the previous message from Eric W. the RUBYOPT environment variable is set. If you want to exit the new bash shell that is opened by "bundle exec bash" then just copy the RUBYOPT environment line, exit the shell then type "export RUBYOPT='THE ARGS THAT YOU COPIED FROM THE PREVIOUS ENVIRONMENT'
Note: this works with ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0] , Rails 3.0.7, gem 1.8.0 and Rake 0.8.7
I've been running into this issue too. It doesn't seem to be related to the specific versions of rails or ruby you mention, which are different than the ones I'm using (Rails 2.3.8, Rake 0.8.7, Ruby 1.9.1p378). It seems to be related to bundler and rake not working well together.
A resolution that worked for me is mentioned at the bottom of this lighthouse ticket. Here is the short version:
Once you do this, you mess up bundler a little bit. At that point you have to clear RUBYOPT in order to run the bundle command:
RUBYOPT= bundle install --relock
EDIT:
Thinking about it a little more, I'm not sure this is necessarily the best way to address this particular issue. You might give Hiral Desai's tip and some other answers a try before resorting to this approach, since this one changes the environment.
Just got such error because of deleted .rvmrc
So please make sure you running rake in correct environment ;)
Another possible solution is given at http://rubyist-journal.com/2011/07/29/howto-fix-rake-0-9-2-to-work-with-ruby-1-9-2-under-rvm/
It seems to boil down to having the same rake gem installed both in your user gem directory and system-wide. Removing either one fixes the issue.
This can happen when you have the rake gem installed in both your repo's rvm gemset and the global one.
I've been running into this issue too after updating rubygem (1.8.10) and bundler (1.0.18)
I solved updating rake to 0.9.2