views:

75

answers:

1

I have such lines in Gemfile:

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

When I try do deploy on server via bundle install --deployment --quiet --without development test, I get an error:

 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 have no git executable on server. But I don't want to use git because cucumber in :test group, and I execute bundler with "--without test"!

What should I do?

+1  A: 

There are no way to do this. Because this is feature of bundler

Note that on bundle install, bundler downloads and evaluates all gems, in order to create a single canonical list of all of the required gems and their dependencies. This means that you cannot list different versions of the same gems in different groups. For more details, see Understanding Bundler.

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

What about you haven't git or any gems at your server. You should use bundle pack. But, now bundle pack don't work with git. Then you should pack git sources manually:

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

petRUShka