剛剛在OSX上安裝了帶有jruby-1.4.0的cucumber 0.7.2
和cucumber-rails 0.3.1
。當我運行捆綁軟件安裝時,它會在我的主應用程序中放置一個cucumber-rails目錄,其中包含所有的gem代碼/依賴項。jruby上的cucumber-rails將gem安裝到我的應用程序根目錄中並使用打包程序
首先,這絕對不是我想要的,我不知道爲什麼只發生在黃瓜欄上。
第二,如果我刪除此文件夾,只是手動安裝黃瓜護欄,當我運行script/generate feature blah
我得到
/Users/bradrobertson/.rvm/rubies/jruby-1.4.0/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:344:in `refresh!': source index not created from disk (RuntimeError)
from /Users/bradrobertson/.rvm/gems/jruby-1.4.0/gems/rails-2.3.5/lib/rails/vendor_gem_source_index.rb:34:in `refresh!'
from /Users/bradrobertson/.rvm/gems/jruby-1.4.0/gems/rails-2.3.5/lib/rails/vendor_gem_source_index.rb:29:in `initialize'
from /Users/bradrobertson/.rvm/gems/jruby-1.4.0/gems/rails-2.3.5/lib/rails/gem_dependency.rb:21:in `new'
from /Users/bradrobertson/.rvm/gems/jruby-1.4.0/gems/rails-2.3.5/lib/rails/gem_dependency.rb:21:in `add_frozen_gem_path'
from /Users/bradrobertson/.rvm/gems/jruby-1.4.0/gems/rails-2.3.5/lib/initializer.rb:298:in `add_gem_load_paths'
from /Users/bradrobertson/.rvm/gems/jruby-1.4.0/gems/rails-2.3.5/lib/initializer.rb:132:in `process'
from /Users/bradrobertson/.rvm/gems/jruby-1.4.0/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
from /Users/bradrobertson/Repos/app/source/trunk/config/environment.rb:13
from /Users/bradrobertson/Repos/app/source/trunk/config/environment.rb:1:in `require'
from /Users/bradrobertson/.rvm/gems/jruby-1.4.0/gems/rails-2.3.5/lib/commands/generate.rb:1
from /Users/bradrobertson/.rvm/gems/jruby-1.4.0/gems/rails-2.3.5/lib/commands/generate.rb:3:in `require'
from script/generate:3
同樣運行rake cucumber
我得到
rake aborted!
source index not created from disk
因此,一些明顯不工作。如果我添加了cucumber-rails目錄,那麼我的rake cucumber
實際上運行。
有人能告訴我爲什麼需要在我的rails應用程序中安裝gem嗎?我從來沒有見過這個。
設置
JRuby的1.4.0
黃瓜0.7.2
黃瓜導軌0.3.1
捆綁0.9.23
webrat 0.7.1
EDIT
爲了補充一點,我決定讓我生病,試圖讓這個工作,所以我刪除了所有的黃瓜/黃瓜欄從我的Gemfile和reran bundle install
。它仍然會創建cucumber-rails目錄,此外,除非該目錄存在,否則我無法運行任何內容(rake等),否則我會收到source index not created from disk
消息。
EDIT2 我只注意到我Rails.root/.bundle/config
有BUNDLE_PATH: cucumber-rails
。有誰知道爲什麼會出現這種情況嗎?
哇完全忘記了這個問題,你是絕對正確的,我巧合地開始尋找到其他的來源並意識到這裏發生了什麼。感謝您將此引回我的注意! – brad 2011-04-07 13:42:21