Packing local ruby ​​gems with the Bundler?

I have a project that I am working on using the stone that we created inside. It was not hosted on rubygems.org or github. But we have this in our repository and in transit on our local machine.

In our Gemfile, we have something similar:

gem "our-custom-gem", :path => "/path-to/our-custom-gem" 

We are trying to pack all of our gems so that we can use the warbler gem to create a .war file for deployment using jRuby.

We would like to be able to run something like "bundle install" or "bundle install --local" to make sure all the gems are installed. Then, if a package bundles all the dependencies specified in our Gemfile, put them in the vendor / package using the "package package" command.

But based on this link (http://gembundler.com/man/bundle-package.1.html), it looks like the package cannot pack the gems specified with: path or: git as the source.

Has anyone found a way around this?

How do you collect “package packages” that are local and which are not part of the git repository or are available on rubygems.org?

Thanks.

+4
source share
2 answers

Last news!

Since Bundler 1.2, the package package command can also package: git and: path dependencies on .gem files. This should be explicitly with the -all option. After use, the -all option will be remembered.

Documentation: http://gembundler.com/man/bundle-package.1.html

+2
source

Judging by this pull requerst , this is a feature planned for 1.1.

One of the main developers gave this workaround , though:

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

Then, in your Gemfile, gem "foo": path => "vendor / git / foo".

Some work was done to fix the problem on this thread .

Good luck

0
source

All Articles