刚刚安装
cucumber 0.7.2
和
cucumber-rails 0.3.1
在OSX上使用JRuby-1.4.0。当我运行bundle安装时,它会在我的主应用程序中放置一个cucumber rails目录,其中包含所有gem代码/依赖项。
首先,这绝对不是我想要的,我不知道为什么这只发生在cucumber rails上。
其次,如果我删除这个文件夹并手动安装cucumber rails,当我运行
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目录添加回
耙黄瓜
实际上是跑步。
有人能告诉我为什么它需要在我的rails应用程序中安装gem吗?我以前从没见过这个。
设置
JRuby-1.4.0版
黄瓜-0.7.2
黄瓜轨0.3.1
捆扎机0.9.23
韦布拉特0.7.1
编辑
除此之外,我觉得我已经厌倦了尝试让它工作,所以我从gemfile中删除了所有cucumber/cucumber rails dep并重新运行
bundle install
. 它仍然会创建cucumber rails目录,而且,我不能运行任何东西,除非该目录存在(rake等),否则我将获得
source index not created from disk
信息。
编辑2
我刚刚注意到
Rails.root/.bundle/config
有
BUNDLE_PATH: cucumber-rails
. 有人知道这是为什么吗?