wayneeseguin/rvm — Issue #629: Rake-less rubies should not default to system-wide rake
Author: jorgenpt
Created: 2011-12-07 01:02:30+00:00
State: open

Currently, if you have a Ruby installed that does not have a rake, then it will default to the system-wide rake. On OS X, this means /usr/bin/rake, which is hardcoded to the ruby in /System.

This causes issues as it'll use different gems and different ruby version, but even worse, in combination with Bundler (bundle exec rake) it'll cause Bundler's gems to be loaded alongside the system-wide gems, causing cryptic and hard-to-debug problems (like https://gist.github.com/1440686 ).

Personally, I think rvm should install a wrapper for Rake that tells the user that there is no rake for their current ruby and exits with an error when there is no rake for the current ruby, rather than redirecting it to the system-wide rake.

This is because hiding a binary that will cause *nothing* but harm is good thing - I spent at least an hour (or more) of my time trying to track down this issue :-)