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.
docker-compose run --rm <container> bash
cd to project directory
bundle install
Related Topics
Regex to Validate String Having Only Characters (Not Special Characters), Blank Spaces and Numbers
How to Generate a Wsdl Using Ruby
Actioncable - Failed to Upgrade to Websocket in Production
Stack Level Too Deep When Using Carrierwave Versions
Sort a List of Objects by Using Their Attributes in Ruby
How to Modify a Text File in Ruby
Keyword for Exclusive or in Ruby
Ruby 1.9 Doesn't Support Unicode Normalization Yet
Ruby - Extracting the Unique Values Per Key from an Array of Hashes
Rails - How to Check for Online Users
Multiple Level Nesting in Yaml
Is There a Gem That Normalizes and Format Us Phone Numbers in Ruby
Ssl_Connect Syscall Returned=5 Errno=0 State=Sslv2/V3 Read Server Hello A
Devise Install from Existing Model/Database
Need Help Maximizing 3 Factors in Multiple, Similar Objects and Ordering Appropriately
Split a String into Chunks of Specified Size Without Breaking Words