Brandon Brandon -4 years ago 121
Ruby Question

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

I'm trying to migrate a version of Redmine from backup to a new server; I'm migrating from Redmine 3.2.3 to 3.3.0. I installed the new version of Redmine (from Bitnami Stack) on my new server and everything loads properly. When I move my old database into the new version, I have to run

bundle exec rake db:migrate

to migrate my database. But... bundler can't find rake somehow even though
gem list
shows it clearly installed. Can I force bundler to use the version of rake that I have installed that it says I don't?

enter image description here

I should mention I've done no customization at all, haven't installed any gems, or changed ruby versions or done anything. This is out of the box Redmine.

I noticed after I made the question that I had two versions of rake installed. I removed both and reinstalled rake 11.1.2 and have the same problem.

Answer Source

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:


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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download