After installing Rbenv and Ruby 1.9.2 and 1.8.7, and setting the current project to use 1.9.2 (it previously used 1.8.7), Rake will no longer run. Running rake routes
gives the messages:
Could not find rake-0.8.7 in any of the sources
Run `bundle install` to install missing gems.
This after runing bundle install
.
Trying bundle exec rake routes
(which is the method used prior to installing Rbenv), produces the following errors:
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/shared_helpers.rb:3.
Invalid gemspec in [/Users/jackrg/Documents/Novelty-Stats/vendor/local/ruby/1.8/specifications/jquery-rails-1.0.19.gemspec]: invalid date format in specification: "2011-11-26 00:00:00.000000000Z"
Invalid gemspec in [/Users/jackrg/Documents/Novelty-Stats/vendor/local/ruby/1.8/specifications/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00.000000000Z"
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/source.rb:161.
NOTE: Gem::SourceIndex#each is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#each called from /Library/Ruby/Gems/1.8/gems/bundler-1.0.9/lib/bundler/source.rb:161.
Could not find rake-0.8.7 in any of the sources
Note that the application itself runs without issue in development (rails c
, rails s
, etc.).
Also note that gem list
lists rake (0.8.7) as a local gem.
If I change the gemfile to request rake version 0.9.2 and then update the bundle (bundle update rake), I get the same errors except that they now refer to version 0.9.2 of rake instead of 0.8.7.
rbenv rehash
after installing the rubies? Also, have you followed instructions on adding the shims directory to your path? – aceofspadesecho 'eval "$(rbenv init -)"' >> ~/.bash_profile
followed byexec $SHELL
as described in steps 3 and 4 of Section 2.1 of Sam Stephenson's doc on installing rbenv, if that's what you mean. I'm not aware of any other step to enable the shims. Is there an independent way to test that shims are enabled? – Jack R-G