is not checked out... bundle install does NOT fix help! - ruby-on-rails

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.

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

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

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

For me it was just a matter of adding this to gemfile:
source 'http://gems.github.com'

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.

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'

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

Installing gem locally in project directory fix it for me.
$ bundle install --path vendor/bundle

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.

My problem was that i had no access to github
try ssh -vT git#github.com and see if you get
git#github.com: Permission denied (publickey).
Then see https://help.github.com/articles/error-permission-denied-publickey/

For anyone here in 2021, the accepted answer is outdated as --deployment flag is deprecated.
Use this instead:
bundle config set --local deployment 'true'

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

What finally helped me once and forever:
Reinstalling everything as Galen suggested (all the steps from https://github.com/carlhuda/bundler/blob/master/ISSUES.md)
Using bundle instead of rvmsudo bundle

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

Restarting bash session helped for me

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 .

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

Related

Capistrano version conflict

I'm trying to upload my Rails app with:
bin/cap production deploy
but the deployment is failing with this error message:
You have requested:
capistrano ~> 3.3.0
The bundle currently has capistrano locked at 3.7.1.
Try running `bundle update capistrano`
If you are updating multiple gems in your Gemfile at once,
try passing them all to `bundle update`
I tried to fix the issue by running:
bundle update capistrano
but that did not solve it.
The thing I don't get is that I don't see where my application 'asks for capistrano 3.3.0'. In my Gemfile I set Capistrano to version 3.7.
Besides the capistrano gem I'm also using:
gem capistrano-rails, '~> 1.2'
gem capistrano3-delayed-job, '~> 1.3'
gem capistrano-figaro-yml
My Gemfile is at:
https://github.com/acandael/personalsite/blob/master/Gemfile
Does someone know how I can fix this Capistrano version issue?
thanks for your help,
Anthony
Please follow all the steps in the right order (don't skip any because you did it)
cd into your project directory
run bundle exec gem uninstall capistrano -a to remove all capistrano versions from your bundle
run gem uninstall capistrano -a to remove all capistrano versions from your system. Note that you may need to run this with root access if you get an error message
run bundle install
run bundle exec gem list capistrano which should output all installed gems with a name that contains "capistrano". You are supposed to have only one version of the capistrano gem
check in your files config/deploy.rb and config/deploy/*.rb if you have a lock 3.x.x instruction, and make sure it matches the install version as show in step 5
run cap in bundle context with bundle exec cap production deploy (use exactly this command line, do not use bin/cap)
try bundle exec cap production deploy
try to remove YOUR_APP/.bindle directory and run bundle install again

Why does my rails not run?

When I run $ rails -server to start a server, there comes an error:
Could not find gem 'sqlite3' in any of the gem sources listed in your Gemfile or available on this machine.
Does that mean I did not install sqlite3? How can I resolve the issue?
First, you have to install all Gems from your Gemfile.
This can be done with bundle install or in short bundle.
If this command executed successfully, you can run your server with rails s.
But I think it's better for you, to start with a tutorial.
server and s are not a switch, but a sub-command.
Run
$ rails server
or
$ rails s
I run into this issue previously, that is because you run bundle install, miss some gems, so you can $ bundle install again,
and you can test the sqlite if is installed:
$ sqlite3 --version
If successed, you can test the rails server.

Could not find rake with bundle exec

When I try execute 'bundle exec rake anything', I get error:
Could not find rake-10.1.0 in any of the sources.
Run `bundle install` to install missing gems.
But when I execute simple 'rake anything', rake is working.
Of cause, I tried setup gem any way, which I know:
gem install rake -v=10.1.0
Wrote "gem 'rake', '10.1.0'" in Gemfile, then execute bundle install
I installed gem for all rvm: rvm all do gem install rake -v 10.1.0
This situation really frustration, because simple rake works, but with bundle exec doesn't want.
I need execute rake with bundle exec
Really need your help!
I had the same issue, with exactly the same error message, with the same Ruby version yesterday. I solved it by removing this line from .bundle/config in my repository:
BUNDLE_DISABLE_SHARED_GEMS: '1'
I have the same problem and my solution was:
Delete my gemfile.lock
rm Gemfile.lock
donwgrade rake in my gemfile
gem 'rake', '10.0.2'
finally
bundle install
I had this problem with an AWS instance, managed by OpsWorks. I was logged in as ec2user. I switched over to the deploy user via sudo su - deploy and ran the bundle command again and it completed without error
I got a similar error when I tried running 'bundle exec $EXECUTABLE' without running 'bundle install' first :|

Can't install ffi gem, Rails fail

While creating creating an integration test via rails generate integration_test foo it declined with
Could not find ffi-1.0.9 in any of the sources
Run `bundle install` to install missing gems.
I ran bundle install to install missing gems, but with no success. Still the same error. I have gem 'ffi' in my Gemfile.
I switched the gemfile line to gem 'ffi', :git => 'git://github.com/ffi/ffi.git' and bundle installed again. It did all sort of stuff and wrote "Your bundle is complete" at the end.
However when I run the rails generate... command again I get:
git://github.com/ffi/ffi.git (at master) is not checked out. Please run 'bundle install'
What the hell is going on with this ffi?
I ran into the same problem and solved it by removing the Gemfile.lock and re-run bundle install.
Perhaps try 'bundle exec rails generate...'
bundle install was failing because it could ffi failed with NoMethodError for spec.
Removing Gemfile.lock, empty the gemset and doing bundle install worked.

How do I use bundler to get a gem from a git repository?

Authlogic has a couple unfortunate deprecation warnings that are fixed in a fork.
How do I use this forked version? I tried adding the following to my Gemfile:
gem 'authlogic', :git => 'git://github.com/railsware/authlogic.git'
And it didn't work quite that well. I started getting:
git://github.com/railsware/authlogic.git (at master) is not checked out. Please run bundle install
And
The git source git://github.com/railsware/authlogic.git is not yet checked out. Please run bundle install before trying to start your application
Assistance will be rewarded with virtual cookies.
Have you tried running bundle install after removing Gemfile.lock?
rm Gemfile.lock
bundle install
Your Gemfile configuration should work, I was able to use the same for and my bundle install command executes as does my bundle list command.
My other suggestion would be removing you ~/.bundler and .bundle directories and checking that you have properly configured git.
You need to run bundle install from the terminal after updating your Gemfile.

Resources