Could Not Find Rake with Bundle Exec

Could not find rake with bundle exec

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'

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

bundle config set --local path 'vendor/cache'

generally fixes it as that is the more common problem. Basically, your bundler path configuration is messed up. See their documentation (first paragraph) for where to find those configurations and change them manually if needed.

Bundler cannot find rake but it seems installed

So, I finally managed to get this error to go away. I started thinking it was some weird permission issue.

To solve this problem, I did the following:

  • Open the Disk Utility, Applications/Utilities/Disk Utility
  • Repair Permissions
  • Remove the .bundle directory in my project
  • Remove the vendor directory in my project
  • Remove the Gemfile.lock
  • bundle install

After that it started working without complaining about not finding rake. Crazy, man. Ugh. Hopefully this helps other folks if they run into the same issue.

Why can't bundler find rake when it's obviously installed?

You are probably using the wrong ruby binary. Note that, the installers for Bitnami Stacks are completely self-contained and run independently of the rest of the software or libraries installed on your system.

Also, taking a look at the screenshots you have shared, you were using ruby 1.9.3 when you have executed ruby -v and the Redmine Bitnami Stacks uses ruby 2.1.9. Probably this is the reason of the issue you are having.

If you want to use the ruby (and the other components) shipped with the Bitnami Stack you need to run the following command:

cd *INSTALLDIR*
./use_redmine

This command will open a new console session with the environment configured to use the stack.

Bundler could not find rake in any of the resources

I'm not really sure what happened and why but I tried doing this on my rails container and I was no longer receiving the said error.

  1. docker-compose run --rm <container> bash
  2. cd to project directory
  3. bundle install


Related Topics



Leave a reply



Submit