2012-08-07 23 views
1

我使用jruby 1.7.2並設置了一個新的rails應用程序。捆綁似乎無法找到所需的(Java/JRuby的基於寶石)使用方法:bundler不承認平臺?找不到寶石

> bundle 
Could not find gem 'neo4j-core (>= 0) ruby' in the gems available on this machine. 

如果我指定的路徑,我得到這個:

> bundle 
Fetching gem metadata from https://rubygems.org/....... 
Fetching gem metadata from https://rubygems.org/.. 
Could not find gem 'neo4j-core (>= 0) ruby' in source at ./vendor/gems/neo4j-core. 
Source contains 'neo4j-core' at: 2.0.1 

也許捆綁器弄不清其platoform - - 爲什麼它會在末尾加上ruby這個詞?我跑ruby -e "puts RUBY_PLATFORM",這給了我:java

回答

10

刪除Gemfile.lock的解決:https://github.com/carlhuda/bundler/issues/2043

+1

你Gemfile.lock的可能是紅寶石產生的,當你切換到JRuby的寶石(紅寶石)僅僅是不存在。當你刪除Gemfile.lock時,依賴關係爲jruby和woohoo重新生成。有同樣的問題,並花了我一段時間才弄明白。謝謝你的提示! – pcv 2014-09-03 20:40:56