Bundler, Rails3: how to avoid git checking boundary stones in: test group during deployment?

I have lines like this in a gemfile:

group :test do ... gem 'cucumber', :git => "git://github.com/aslakhellesoy/cucumber.git" ... end 

When I try to deploy to the server using bundle install --deployment --quiet --without development test , I get an error message:

  sh: git: command not found ** An error has occurred in git when running `git clone "git://github.com/aslakhellesoy/cucumber.git" "/home/test/rails_apps/test_app/shared/bundle/ruby/1.8/cache/bundler/git/cucumber-3eb3f1a09813a1271fada66aac31d953ef2ad625" --bare --no-hardlinks. Cannot complete bundling. 

I do not have a git executable on the server. But I do not want to use git, because the cucumber is in: a test group, and I am doing a bunch with "--without test"!

What should I do?

+4
source share
1 answer

There is no way to do this. Since this is a bundler property

Please note that when installing the package, the bundler downloads and evaluates all the gems, in creating a single canonical list of all the necessary gems and their dependencies. This means that you cannot list different versions of the same stones in different groups. For more, see Understanding the Bundler.

http://gembundler.com/man/gemfile.5.html (see GROUPS section)

How about you don't have git or any gems on your server. You must use bundle pack . But now bundle pack does not work with git . Then you need to manually package the git sources:

 cd vendor/git git clone git://github.com/foo/foo.git 

Then in your gemfile

gem "foo": path => "vendor / git / foo"

.

http://github.com/carlhuda/bundler/issues/labels/git#issue/67

+3
source

All Articles