Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

deploying rails3 apps with bundler and phusion passenger: .bundle dir not found

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!

like image 449
z3cko Avatar asked Mar 22 '10 17:03

z3cko


3 Answers

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"
like image 114
parasew Avatar answered Nov 06 '22 01:11

parasew


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!

like image 28
Galen King Avatar answered Nov 06 '22 00:11

Galen King


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...

like image 2
Terry Ray Avatar answered Nov 05 '22 23:11

Terry Ray