10

i am trying to deploy rails3 apps with the latest phusion passenger 2.2.11 and ruby-enterprise-1.8.7-2010.01. i am using bundler, but passenger seems to not be able to find the .bundle dir.

error message:

git://github.com/rails/rails.git (at master) is not checked out. Please run `bundle install` (Bundler::PathError)

where do i install the .bundle? where do i tell passenger which bundle to use? any hints?

thanks!

Jon Seigel
  • 12,251
  • 8
  • 58
  • 92
z3cko
  • 3,054
  • 8
  • 40
  • 59

6 Answers6

19

i think the command you are searching for is

bundle pack

which will move your gems from the .bundle directory to the vendor/cache.

see yehuda katz' posting about bundler workflows on his site: http://yehudakatz.com/2010/02/09/using-bundler-in-real-life/

more information on the bundler directory: you can add in you application.rb file the following line, which will change the bundler dir for phusion passenger:

ENV['BUNDLER_HOME']="/home/or-wherever-you-want-to-point-it"
parasew
  • 474
  • 4
  • 6
  • Note that this blog post is out of date (for people seeing this from here on out) – A. Wilson Jan 07 '13 at 23:14
  • 2
    I had to run `bundle pack --all`. Without the `--all` flag it wouldn't pack GIT/path dependencies. (Using bundler 1.3.0.) – sinharaj Mar 08 '13 at 10:25
4

You shouldn't need to "pack" your gems.

I've spent a week trying everything. Following ALL of the troubleshooting steps here finally resolved it:

https://github.com/carlhuda/bundler/blob/master/ISSUES.md

Good luck!

Galen King
  • 772
  • 10
  • 18
  • Yeah, shouldn't need to, but it's exactly what I had to do in production on Digital Ocean Ubuntu rails appliance. I tried everything in the link you pasted to no avail – Dex Aug 14 '14 at 00:31
2

Been fighting this one also. I've found that doing a

bundle --deployment

does the trick. See the post here: Rails 3: Passenger can't find git gems installed by bundler

Seems a bit hacky to me however. Would like to know if this is an issue with Passenger or bundler? Is it version specific, etc...

Community
  • 1
  • 1
Terry Ray
  • 300
  • 3
  • 11
0

try

bundle install vendor/bundler
Thiem Nguyen
  • 6,345
  • 7
  • 30
  • 50
Niket
  • 1,105
  • 12
  • 15
0

What did helped me exactly on: 1. CentOS 6.x 64bit 2. Bitnami stack bundle with spree 1.3.1

cd SPREE_APP_ROOT_AKA_RAILS_ROOT
/opt/spree-1.3.1-0/ruby/bin/bundle install

As a result gem appeared in the root. But it's not good. It should go to vendor/cache and other underlying folders.

The I run:

/opt/spree-1.3.1-0/ruby/bin/bundle package --all 

Option --all is for packaging "git" gems.

Restart passenger and go on:)

Capacytron
  • 3,425
  • 6
  • 47
  • 80
0

This gem bundler site said that for deployment you may use:

bundle install --deployment
  • Doesn't work for me. It tries to build native extensions and it brings even more pain: make, gcc, toubles with used libs in gcc compilation.... – Capacytron Jan 21 '13 at 09:01