Cucumber-rails on jruby installs gem into my apps root directory with bundler
- by brad
Just installed cucumber 0.7.2 and cucumber-rails 0.3.1 with jruby-1.4.0 on OSX. When I run a bundle install, it places a cucumber-rails directory in my main app with all of the gem code/dependencies.
First off, this is definitely not what I want and I'm not sure why this happens for cucumber-rails only.
Second, if I delete this folder and just manually install cucumber-rails, when I run script/generate feature blah I get
/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
Similarly running rake cucumber I get
rake aborted!
source index not created from disk
So something obviously doesn't work. If I add that cucumber-rails directory back in, then my rake cucumber actually runs.
Can someone tell me why it would need to install the gem right in my rails app? I've never seen this before.
setup
jruby-1.4.0
cucumber-0.7.2
cucumber-rails 0.3.1
bundler 0.9.23
webrat 0.7.1