RbenvとRuby1.9.2および1.8.7をインストールし、現在のプロジェクトで1.9.2(以前は1.8.7を使用)を使用するように設定すると、Rakeは実行されなくなります。実行rake routes
するとメッセージが表示されます。
Could not find rake-0.8.7 in any of the sources
Run `bundle install` to install missing gems.
これは実行後bundle install
です。
( Rbenvbundle exec rake routes
をインストールする前に使用された方法です)試行すると、次のエラーが発生します。
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
アプリケーション自体は開発中(、、など)で問題なく実行されることに注意してrails c
くださいrails s
。
またgem list
、ローカルの宝石としてrake(0.8.7)がリストされていることにも注意してください。
gemfileを変更してrakeバージョン0.9.2を要求してから、バンドルを更新すると(bundle update rake)、0.8.7ではなくバージョン0.9.2のrakeを参照することを除いて、同じエラーが発生します。