bundle install --local

159 views
Skip to first unread message

Perry Smith

unread,
Sep 15, 2015, 8:06:11 PM9/15/15
to ruby-bundler
I've tried hard to figure this out but I'm not making any progress.

I'm trying to do capistrano deploy to a host that is behind a firewall and has not http proxy servers available.  That failed but I am now trying to run the bundle command it tries to execute by hand on the target host.

The command that I'm trying to execute is:

bundle install --local --path /usr/local/www/raptor/shared/bundle --without development test --deployment

and the reply is:

Could not find rake-10.4.2 in any of the sources

The --local option says "--local: Do not attempt to fetch gems remotely and use the gem cache instead" -- fine.  But where is the gem cache?

I've put the gem files on the target host.  I have even installed them as local ruby gems so "gem list" displays all the required gems.  I've tried putting them down under /usr/local/www/raptor/shared/bundle/ruby/1.9.1/cache and that didn't help.  So I'm stumped.

Where or how do I create a gem cache local to a host?  (I've tried gem server at various points but that doesn't seem to help either.)

Thank you,
Perry

Andre Arko

unread,
Sep 15, 2015, 8:08:37 PM9/15/15
to ruby-bundler
Run `bundle pack` to create a `vendor/cache` directory containing all the .gem files that you need to be able to install.

Perry Smith

unread,
Sep 16, 2015, 1:02:39 PM9/16/15
to ruby-bundler
I have four gems that use native code and my target host is much different than my development platform.  Is that going to be a problem?

If it helps, I'm running bundler 1.10.6, ruby 1.9.3,

Perry Smith

unread,
Sep 16, 2015, 2:21:17 PM9/16/15
to ruby-bundler
My apologies.  I thought this was going install the gems into vendor but it just puts the gem files.  This is exactly what I needed.

Looking at the code, there appears to be a cache-path option?  It was when I saw that part of the code that it clicked how your suggestion was going to work.

Thank you,
Perry


On Tuesday, September 15, 2015 at 7:08:37 PM UTC-5, Andre Arko wrote:
Reply all
Reply to author
Forward
0 new messages