0
我從RVM切換到rbenv及其插件。我的Gemfile很好,但當我做bundle install
,rbenv rehash
等,並運行rack <whatever>
它沒有找到任何寶石。見下文。任何人有任何想法?Rbenv/bundle問題 - 在機架中找不到gems
Vanessas-MacBook-Pro:my-app vanessa$ rbenv versions
* 1.8.7-p352 (set by RBENV_VERSION environment variable)
1.9.2-p290
1.9.3-rc1
rbx-1.2.4
Vanessas-MacBook-Pro:my-app vanessa$ rbenv version
1.8.7-p352 (set by RBENV_VERSION environment variable)
Vanessas-MacBook-Pro:my-app vanessa$ more Gemfile
source 'http://rubygems.org'
gem "sinatra"
gem "god"
gem "rack", '1.2.3'
gem "activemodel", "~>3.0"
group :test do
gem "rake"
end
Vanessas-MacBook-Pro:my-app vanessa$ gem list
*** LOCAL GEMS ***
bundler (1.0.21)
rake (0.9.2.2)
redgreen (1.2.2)
rubygems-update (1.8.11)
Vanessas-MacBook-Pro:my-app vanessa$ rake test
/Users/vanessa/.rbenv/versions/1.8.7-p352/bin/ruby -I"lib:lib:test" -I"/Users/vanessa/.rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib" "/Users/vanessa/.rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb" "test/**/test_*.rb"
/Users/vanessa/.rbenv/versions/1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- rack/test (LoadError)
from /Users/vanessa/.rbenv/versions/1.8.7-p352/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
...
...
rake aborted!
Command failed with status (1): [/Users/vanessa/.rbenv/versions/1.8.7-p352/bin/...]
Tasks: TOP => test
(See full trace by running task with --trace)
Vanessas-MacBook-Pro:my-app vanessa$
如果刪除Gemfile.lock並再次執行捆綁,rbenv rehash會發生什麼? –