安装Rbenv和Ruby 1.9.2和1.8.7并将当前项目设置为使用1.9.2(以前使用1.8.7)后,Rake将不会长时间运行。乳宁bundle install
后安装rbenv并更改Ruby版本后,Rake不再运行
Could not find rake-0.8.7 in any of the sources
Run `bundle install` to install missing gems.
此:运行rake routes
给出的消息。
试图bundle exec rake routes
(这是之前安装Rbenv所使用的方法),产生如下错误:
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
列出耙子(0.8.7)作为本地宝石。
如果我更改gemfile来请求rake版本0.9.2,然后更新bundle(bundle update rake),我会得到相同的错误,只不过他们现在引用rake 0.9.2而不是0.8.7。
你在安装红宝石后运行'rbenv rehash'吗?另外,您是否遵循了将shims目录添加到路径的说明? – aceofspades 2012-03-14 03:16:03
正如Sam Stephenson关于安装rbenv的文档2.1节的第3步和第4步所描述的那样,我做了'echo'eval“$(rbenv init - )”>>〜/ .bash_profile',后面跟着'exec $ SHELL',如果这是你是什么意思。我不知道有任何其他步骤来启用垫片。是否有独立的方式来测试垫片是否启用? – 2012-03-15 18:42:09