The OpenShift forums have been retired.
You can still read and search them, but for help, please visit

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

I tried to get my Rails app that I based on the rails-example except for a postgres database and I got Could not find rake- and I got the following error - Could not find rake-10.0.3 in any of the sources (Bundler::GemNotFound)

I found that the gem can only be added through bundler so I tried adding rake 10.0.3 to bundler and this didn't help

Thinking I messed up with reconfiguring my app I tried to I tried the Rails cartridge and I get the same error message

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

Does anybody have a cure for this?

Sorry Actually the Rails cartridge worked - trying to figure out the difference


I used the following steps to resolve it:

  • Update 'rake' gem in your local environment (on your desktop) gem install rake -v 10.0.3
  • Run bundle update on your desktop to update Gemfile.lock
  • Make sure it works as expected on your desktop (eg, rake routes)
  • Make sure to have source '' in your Gemfile (or some other publically available gem repository)

Continue if everything before works as expected

  • SSH to your application and execute gem install rake -v 10.0.3
  • Check new rake as rake routes
  • Commit the change in your local repository
  • Push this change to "origin" repository

Please note that current version of 'rake' is 10.0.4

Good luck, Boris

One more comment.

All gems in OpenShift are installed into ~/ruby-1.9/repo/vendor/bundle/ruby/1.9.1/gems This explains how you could have rake-10.0.4 installed and used by your application while simple command returns incorrect output:

rake --version
rake, version

After updates, check content of the directory and once in a while run

cd ~/ruby-1.9/repo
bundle clean

Use following command to check the space allocated by all your gems du -h --max-depth=1 ~/ruby-1.9/repo/vendor/bundle/ruby/1.9.1/gems

I recently discovered that my "gems" directory was 170M in size. Cleaning freed almost 100M of precious space on 1G quota.

Good luck, Boris