78
https://github.com/intridea/omniauth.git (at master) is not checked out. Please run `bundle install` (Bundler::GitError)

So what do I do? bundle install works on development, but when I push and deploy to my production server. I get this error, even after running bundle install on my production server.

fivetwentysix
  • 7,379
  • 9
  • 40
  • 58
  • 6
    Even if your question is already solved, could you add some more context to it so it will be useful for other people having similar problems? What did you do to get this error message, for example? – Paŭlo Ebermann Aug 27 '11 at 22:02

17 Answers17

121

You're probably running Passenger. This is the issue with some solutions - http://code.google.com/p/phusion-passenger/issues/detail?id=505

Try running bundle install --deployment

Dogbert
  • 212,659
  • 41
  • 396
  • 397
  • Just a note, got a depreciation message running 3.0.9 stating that we should use bundle install path deployment. – fivetwentysix Jul 11 '11 at 11:24
  • 10
    That masks the problem more than solves it – --deployment mode is not intended for development and poses problems with each bundle. – Greg Funtusov Mar 16 '14 at 22:21
  • I had the same problem with Pow and this fixed it too. – Hass Jul 16 '14 at 07:33
  • +1. Saved my day a few times. Interesting that I have to install bundles with --no-deployment, and then again with --deployment for Redmine. – ethree Oct 11 '14 at 03:04
  • 2
    "In deployment mode, Bundler will ´roll-out´ the bundle for production use." This vendors (copies) the gems into your development app, bloating the app's code. There must be a better way to solve the issue? – Dennis Feb 11 '15 at 00:56
  • 2
    [*Regarding my previous comment:*](http://stackoverflow.com/questions/6648870/is-not-checked-out-bundle-install-does-not-fix-help#comment45219008_6648894) Try removing `Gemfile.lock` and `.bundle/config` from your project and running `bundle install`. (Note that the lack of a `Gemfile.lock` may cause some gems to update when you run `bundle install`.) It fixed the issue for me. Worth a try before you enable deployment mode in development or test environments. – Dennis Feb 11 '15 at 01:23
  • 1
    In case you guys need it later, this is how you revert it: `bundle install --no-deployment` – Adrian Teh Aug 28 '17 at 14:06
  • The `--deployment` in now deprecated, it is now best to use `bundle config set --local deployment 'true'` – Sylhare Nov 08 '21 at 19:17
24

This error can be related to the spring gem. Regenerating spring binstubs worked for me.

bundle exec spring binstub --all

https://github.com/rails/spring/issues/387

jvenezia
  • 890
  • 7
  • 10
13

for the guys that stuck with "bundle & git repo " problems.

1. $ bundle pack
2. $ bundle install --path vendor/cache

more details, please refer to https://stackoverflow.com/a/5268534/445908

Community
  • 1
  • 1
Siwei
  • 19,858
  • 7
  • 75
  • 95
6

For me it was just a matter of adding this to gemfile:

source 'http://gems.github.com'
Andres Calle
  • 257
  • 1
  • 3
  • 11
  • 15
    Note that this solution won't work now because GitHub no longer builds gems. See http://webcache.googleusercontent.com/search?q=cache:fAsVmK28OwwJ:gems.github.com – Dennis Feb 10 '15 at 22:04
6

When your computer never restarts, Spring might be the problem. Spring was running for 350 hours and caused caching the outdated TEST environment. I had this problem in my cucumber test environment in Rubymine. Strange this was that from (mac) the command prompt there was no problem.

spring status
spring stop

and voila! It all worked again.

Hugo Logmans
  • 2,202
  • 1
  • 19
  • 14
  • This can also happen if you change your repo urls from git:// to https://. `spring stop` a.k.a. "have you tried turning it off and on again?" is the only (!) thing that will work in that case. – jaynetics Sep 20 '16 at 13:33
6

Ran into this problem after upgrading to ruby 2.7.0

Looks like maybe there has been changes to deprecate the use of the business company focused:github => to the actual software platform focused :git =>. Maybe better for easier code logic maintainability.

Change the following:

gem 'devise', :github => 'plataformatec/devise'  

to the following:

gem 'devise', :git => 'git://github.com/plataformatec/devise'

An alternative is you may still reference :github as your git_source at the top of your Gemfile and just reference to the Gems as normal like so:

source 'https://rubygems.org'                                                                                                                             
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
...
gem 'devise'
earth2jason
  • 715
  • 1
  • 9
  • 20
4

If you run bundle install and then on attempt to run anything you see "... github.com ... is not yet checked out. Run bundle install first." - that means you need to use bundle exec before your command, e.g.:

bundle exec rails s
Daniel Garmoshka
  • 5,849
  • 39
  • 40
2

For anyone here in 2021, the accepted answer is outdated as --deployment flag is deprecated.

Use this instead:

bundle config set --local deployment 'true'
Divins Mathew
  • 2,908
  • 4
  • 22
  • 34
1

Installing gem locally in project directory fix it for me.

 $ bundle install --path vendor/bundle
Ken Ratanachai S.
  • 3,307
  • 34
  • 43
1

This solution

$ bundle install --path vendor/bundle

has fixed my issue with running multiple rails app via foreman.

Note: Don't forget to execute rbenv rehash after if you are using rbenv.
And add /vendor/bundle in your .gitignore if not yet added.

General Failure
  • 2,421
  • 4
  • 23
  • 49
BMA88
  • 329
  • 2
  • 2
  • Bundle is recommending to use `bundle config set --local path 'vendor/bundle'` instead as `--path` is deprecated. – Sylhare Nov 08 '21 at 19:16
1

My problem was that i had no access to github

try ssh -vT [email protected] and see if you get

[email protected]: Permission denied (publickey).

Then see https://help.github.com/articles/error-permission-denied-publickey/

montrealmike
  • 11,433
  • 10
  • 64
  • 86
1

Another solution, that helped me when I was getting same issue while installing private gem from my Github repo, in Docker (my gems are in volume /gems):

# Add known host 
RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts

RUN bundle config set path /gems # this fixes issue with private repos DON'T USE ENV BUNDLE_PATH /gems
RUN --mount=type=ssh bundle install

To forward SSH, build using this command:

docker build --ssh default .
Tomasz Wójcik
  • 955
  • 10
  • 23
0

It is a permission error. The following worked

Environment : RVM with Apache

RVM user:group : rvm:rvm

Apache user:group : apache:apache

You need to add apache user to RVM group

usermod -a -G rvm apache
anbiniyar
  • 679
  • 4
  • 14
  • 1
    Also adding to the discussion: I was having the same problems, so I tried explicitly setting the user in nginx.conf to the user for which RVM was installed and it worked. So before it was commented out: #user nobody;, now it's: user jake. – SnakeWasTheNameTheyGaveMe Apr 25 '14 at 04:25
0

What finally helped me once and forever:

  1. Reinstalling everything as Galen suggested (all the steps from https://github.com/carlhuda/bundler/blob/master/ISSUES.md)

  2. Using bundle instead of rvmsudo bundle

Greg Funtusov
  • 1,377
  • 15
  • 18
0

Update your Gemfile as follows;

gem 'activeadmin', github: 'activeadmin/active_admin', branch: '0-6-stable'

and then,

bundle install

Iif still error occurs (because of you have tried 'bundle install --deployment', then try running)

bundle install --no-deployment
Breen ho
  • 1,601
  • 14
  • 23
0

Restarting bash session helped for me

urmurmur
  • 224
  • 4
  • 13
0

Recently I got the error message on Circle CI:

#!/bin/bash -eo pipefail
bundle exec rails db:setup

https://github.com/randym/axlsx.git (at c8ac844@c8ac844) is not yet checked out. Run `bundle install` first.

Exited with code exit status 1
CircleCI received exit code 1

This error happened when gem dependencies can not be resolved. So I switched back to pre release version in my Gemfile to fix it

-gem 'axlsx', github: 'randym/axlsx', ref: 'c8ac844572b25fda358cc01d2104720c4c42f450'
+gem 'axlsx', '3.0.0.pre'

and run update to update the gem dependencies

bundle update axlsx
itsnikolay
  • 17,415
  • 4
  • 65
  • 64