16

I am running into troubles installing gems through bundle install from an app that i cloned through git.

Here is the what the output from bundle install looks like:

bundle install
/usr/lib/ruby/vendor_ruby/bundler/rubygems_ext.rb:8:in `require': no such file to load --     rubygems (LoadError)
from /usr/lib/ruby/vendor_ruby/bundler/rubygems_ext.rb:8
from /usr/lib/ruby/vendor_ruby/bundler.rb:11:in `require'
from /usr/lib/ruby/vendor_ruby/bundler.rb:11
from /usr/bin/bundle:4:in `require'
from /usr/bin/bundle:4

I read up on google and other stackoverflow questions but the file pointed to above is in th ruby folder so it should not be anyway related to the app (which in theory would mean i wouldn't be able to bundle install for any app). any way how to fix this??

any help will be deeply appreciated!

6
  • 1
    refer this stackoverflow.com/questions/2896485/… Commented May 8, 2013 at 9:34
  • I believe this might be my issue, I ran ruby -v and it should have returned ruby 2.0.0-p0 but instead it returned ruby 1.8.7 which is very weird as I never installed it on my linux. Commented May 8, 2013 at 16:12
  • i think you can uninstall all. Download rails installer from railsinstaller.org and install it again Commented May 9, 2013 at 4:18
  • @shrikant1712 Rails installer doesn't have ruby 2.0.0 yet so I think the only way is through rvm or rbenv and I m on ubuntu so I dont think railsinstaller would work, would it? Do you happen to know the command to completely uninstall all versions of ruby in linux? Commented May 9, 2013 at 5:33
  • 1
    checkout this stackoverflow.com/questions/2430059/… Commented May 9, 2013 at 5:39

6 Answers 6

35

I have the same question with yours, I searched a lot, but no one is the solution, at last, I asked co-worker in my company, he just ran

gem list

to list the local gems, we found there's no bundler gem, so he ran

gem install bundler

then he ran

bundle install

OK, it worked.

Sign up to request clarification or add additional context in comments.

1 Comment

Getting error: Could not find modernizr-2.6.2 in any of the sources
0

Are you in the directory where your gemfile is located? I believe your current directory needs to be there.

Comments

0

Once Gemfile.lock is created, whenever you run bundle install, Bundler reads this file rather than Gemfile to work out the dependencies of the application and installs from it.

try check Gemfile/Gemfile.lock what is need to install

2 Comments

I see. Since I cloned from git I believe I would need to install most of the gems. What I did was I took out the gemfile.lock file from the project directory and put it in a different folder and ran bundle install again. But no luck, still the same error. Shouldn't it create a gemfile.lock if it doesn't see one in the project directory?
check first list gem install gem list and compare with your gemfile. I think the problem your gem not install but you have listed in gemfile.
0

Make sure you're inside your application's directory before you bundle install. Because it will find the GemFile and check what gem needs to install

Comments

0

Run the following command :

sudo apt-get install rubygems build-essential

It should work like a charm.

Comments

-1

I had this same problem (exact same output) and it is solved for me by simply installing the package 'rails'.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.