Rails 3: uninitialized constant Bundler


I’m trying to deploy a Rails 3 application to a shared server. However, I get the following error from Passenger: uninitialized constant Bundler.

I guess the error is somehow related to the version of the rack gem: Rails 3 expects version 1.2.1, whereas the installed version is 1.1.0. I installed the newer version into my home directory (plus it is bundled with my application), without luck…

Well, that’s not entirely true: if I add “require ‘bundler’” to config/boot.rb, restart Passenger, remove the require statement I just added, and restart Passenger again, then my application works fine. But only until Passenger unloads my application due to inactivity. After that, I get the error mentioned above.

Does anyone have an idea of how to make it work permanently?


I have the exact same problem. I have contacted support, but they seem not to be willing to update rack gem. I have asked to migrate my account to server which has rack 1.2.1… I am waiting for response.

Same problem here.

I can run ‘rails s’ from my shell and my site then works on port 3000, but trying to use passenger, gives me ‘uninitialized constant bundler’

I’m having the same problem too. I have my paths only pointing to my local copy of Rails3 and gems. I suspect that Passenger executes the Rails3 app from in environment that uses DH’s default gem path although I’m not sure. Running “rails s” works fine. I think that this works because its using my paths to local copies of gems when executed while I’m logged in via ssh. Is there a way to see what environment Passenger is running under?

I have contacted support several times in order to upgrade version of rack, or to migrate my account to server which has newer version of rack installed. They didn’t want to do neither, so I’ve decided to close my dreamhost account and move to Linode.

I’ve been with Dreamhost since 2007, but their lack of support for rails drove me to make this big decision.

Linode is VPS hosting. It gives you the ability to install ANY linux distribution. I have chosen Ubuntu, and I managed to install everything i need in order to run rails3 apps in just few hours. They have large knowledge database where everything is explained in step-by-step guides.

Linode is a little bit more expensive than Dreamhost, but hey, its VPS and it gives you the freedom to do whatever you want.