Could not find rake-10.3.2 in any of the sources (Bundler::GemNotFound)

Posted September 26, 2014 12.9k views


I just created a new droplet, after configure Git, MySQL, this and that, upload my rails repository, doing bundle install, rake db:migrate and restarting Unicorn server, I get into this error:

E, [2014-09-26T11:19:22.895711 #15963] ERROR – : Could not find rake-10.3.2 in any of the sources (Bundler::GemNotFound)

I was looking over the Internet, many of the solutions just doesn’t work. The last one was getting rid of my .bundle/config file because they said it was overwriting the BUNDLE_PATH. But after doing that, running bundle, restarting, etc, the problem is still there.

It’s a preconfigured droplet with Ubuntu & Rails. Running gem env:

     - /usr/local/rvm/gems/ruby-2.0.0-p353
     - /usr/local/rvm/gems/ruby-2.0.0-p353@global

Seems like gems aren’t installed where they should, but I have no idea where they are really installed. Tried even with bundle install --path=/usr/local/rvm/gems/ruby-2.0.0-p353@global with the same luck.

Anyone knows what could I do or why is this happening?

1 comment
  • Hi,

    if I understand you correctly, you had no problem doing “bundle install” and “rake db:migrate”. You got this error (GemNotFound) when you tried to access to the site?

    Under which user did you run these commands? Did you try the preconfigured “rails” user? Did you change any preconfigured settings - ruby version, for example?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hi. Thank you for your answer.

I am using root all the time, since when I tried to use the rails preconfigured user I can’t really use any command, for example bundle:

$ bundle install
-sh: 1: bundle: not found
  • I haven’t try the 1-click installation, I prefer manual installation (and ruby from source - not rvm and passanger instead of unicorn). However, Unicorn (in the 1-click image) uses the rails user to run your app. For this reason, this user needs to have access to all these gems. You can try to run gem install bundler under rails user and than bundle install. Or you can try it with a fresh droplet to check if there is something messed up.

  • Thank you again @jkostolansky.

    For some reason I can’t even user gem with my rails users. I will try to create everything from scratch trying to use the rails user. I will make an update here.

  • Well, on a fresh install the rails user has the same problem. Can’t make either use of the gem command nor other like bundle.

  • I don’t know what it was. I finally just transfered an image from my personal account which was working well and mounted a new droplet with it, cloned the repository there and everything works fine.

    There were too many errors when I create a droplet from DO’s Rails on Ubuntu. Main difference with the one I copied I think it’s the Ruby version. On that machine I use root to install gems and it really works ok. Wasn’t still able to make use of the provided rails user. Even not in a complete fresh droplet. Sounds a bit silly.

I am having this exact problem - been trying to solve for a couple of hours now…