This project is archived and is in readonly mode.
Should allow overriding 'gem' command for environments with multiple ruby installs
Reported by dwaite | June 3rd, 2009 @ 03:15 AM | in 3.x
When on Mac OS X, installing ruby 1.9 from MacPorts will add a '1.9' suffix to commands. Some Linux distributions also have such a suffix by default. However, when doing a 'rake1.9 gems:install', the GemDependency object runs the 'gem' command based solely on the ruby system string.
The attached patch adds support for a GEM_COMMAND environment variable, to allow for arbitrarily specifying the executable name (and possibly path) for running the 'gem' utility. It seems that the unix idiom for specifying such things is the tool name in caps (i.e. CC=gcc). However, 'GEM' is already used to specify a specific gem name by the rake 'gem:' tasks.
Comments and changes to this ticket
-
dwaite June 3rd, 2009 @ 03:22 AM
the test is insufficient as it depends on the current working directory. I created a local variant which uses:
ENV['GEM_COMMAND'] = "touch #{filename};#"
However, I do not know if such unix shell gymnastics are suitable for tests.
-
dwaite June 3rd, 2009 @ 11:47 PM
- Tag set to patch
-
dwaite June 4th, 2009 @ 05:25 AM
Based on feedback, revised testing to just call gem_command vs. invoking a script/command.
-
dwaite June 4th, 2009 @ 05:26 AM
(probably bad naming convention on my part; that is a new patch and is not meant to be installed in-order)
-
Rohit Arondekar October 9th, 2010 @ 04:07 AM
- State changed from new to stale
- Importance changed from to
Marking ticket as stale. If this is still an issue please leave a comment with suggested changes, creating a patch with tests, rebasing an existing patch or just confirming the issue on a latest release or master/branches.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>