breaking into the unknown…

Bundler::GitError with passenger


Recently, I get into a strange problem. I’am using jqgrid_for_rails gem for jqgrid implementation. There are some changes in the gem which is available in the master branch of github but not in the gem published or, I think they have still not released the new changes to So, I linked the source code of the gem to its git repository in my Gemfile as below

gem 'jqgrid_for_rails' # it will fetch the gem from I replaced it with the below line

gem 'jqgrid_for_rails', :git => '' # it will 
fetch the gem from its git repository

I run bundle install , which installed the gem and everything worked fine in development. I pushed the code to production. restart nginx and passenger, but my application breakdown with below error notified by passenger, master) is not checked out. Please run bundle install(Bundler::GitError)


SO, the error is obvious, and they are also suggesting the solution. Well, I have already run bundle install any way I run it again

$ bundle install


Using jqgrid_for_rails (1.0.1) from (at master) # it means the gem is allready there

$ bundle show jqgrid_for_rails
/home/arun/Projects/third-pillar/vendor/bundle/ruby/1.9.1/bundler/gems/jqgrid_for_rails-62969c07e4ca # so the gem is installed

But still the error persists. No doubt, Passenger is not able to read the installed gem from rvm when installed with source as git repository, this may be because, when you install a gem from it get installed in gems folder of your gemset but if you specify some other source as we have done for jgrid_for_rails above the gem will get installed into bundler folder of your gemset. Somehow passenger do not able to read it from there. I tried without passing the git source and running bundle install again and things work this time.

But, My purpose is not solved as my application is UP but I can’t use jqgrid_for_rails gems feature which is must for me. So I restored back my gemfile and looking deep for some more solution. I got the solution in bundler site itself here

SOLUTION :  After deployment of your code run bundle install – -deployment instead of bundle install

when you run bundle install, the bundler install the gem into gems folder of your gemset i,e the gem resides in rvm of your system

when You run bundle install – -deployment  the bundler install the gems locally in your project’s vendor/bundle/ruby/1.9.1/gems folder i.e the gems are always available in your project and bundler will tell passenger to look for gems from this folder instead of RVM


Author: arunyadav4u

over 7 years experience in web development with Ruby on Rails.Involved in all stage of development lifecycle : requirement gathering, planing, coding, deployment & Knowledge transfer. I can adept to any situation, mixup very easily with people & can be a great friend.

7 thoughts on “Bundler::GitError with passenger

  1. Dear arunyadav4u,

    I am having similar issues, using jruby 1.7.3 and passenger nginx edition to deploy. I am having the error “The git source s not yet checked out. Please run `bundle install` before trying to start your application (Bundler::GitError)”

    however bundle install –development did not do the trick for me.

    I tried the various suggestions on the rvm site, to no avail either.

    What’s a little odd to me, when I try a passenger-status, I get a Gem::LoadError: Could not find passenger (>= 0), it is searching through my rvm gemset for the jruby installation, but I can reaffirm that passenger is installed under that gemset.

    Can you offer any advice?

    • Hi Dareths,

      Sorry for late reply and wish you would have found the solution to your problem by now.
      I think you have mistyped the command here..but have tried the correct command below

      bundle install – -deployment

      on your server….can you provide me the log of the above command, so that I can trace the problem.

      As far passenger gem issue is concerned, you need to install the passenger-nginx module coming with the gem after installation.
      see this post, will give you some insight into your problem

      • Ah yes, I did mistype, it was a typo, I was using the correct command in the terminal.

        I did track down my environment. Turns out it was more an issue with RVM than anything. Some of my gems require an oath token, which is set as a virtual environment variable. The reason why, is because I was using the newer form of ‘rvmrc’ as suggested by the new version of RVM called .ruby-version. I am using a solution called autoenv (on github) now to bind to ‘cd’ to set the proper project-specific environment variables now 🙂

        fyi, I got frustrated in the process and actually switched to torquebox for my jvm deployment, so in a way it was a halfway blessing because torquebox looks amazing 🙂

  2. Its fine…

    Iam using RVM for last three years without any problem. But good to know about torquebox. It look good and I will definetly give it a try

  3. I like the helpful information you provide in your articles.
    I’ll bookmark your blog and check again here frequently.

    I am quite certain I will learn many new stuff right here!
    Best of luck for the next!

  4. Just desire to say your article is as astounding.
    The clearness in your publish is simply excellent and i
    can suppose you are a professional in this subject. Well together with your permission allow me to seize your feed to stay updated with
    drawing close post. Thank you one million and please continue the rewarding work.

  5. I’d like to find out more? I’d want to find out some additional information.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s