This project is archived and is in readonly mode.
commit 6f4c451 malfunctions with rvm's gemset
Reported by Sakuro | March 3rd, 2010 @ 04:40 PM | in 3.0.2
[EDIT: format correctly]
This problem happens when you use rvm and install bundler gem in
one of
its gemsets(rvm's feature to switch between sets of gems to use)
and
generate an application with --dev or --edge option.
Create a gemset dedicated to Rails3(say rails3b) and install bundler in it:
$ rvm use mput-head
$ rmv gemset create rails3b
$ rvm use mput-head%rails3b
$ gem install rails3b ... # installs rails3 dependencies including bundler
$ which bundle
~/.rvm/gems/mput-head%rails3b/bin/bundle
Now rails derives bundle command's path from
Thor.ruby_command,
which is ~/.rvm/rubies/mput-head/bin/ruby, it expects bundle
command
is ~/.rvm/rubies/mput-head/bin/bundle. So
$ ruby ~/Projects/rails/railties/bin/rails myapp --dev
<snip>
create vendor/plugins/.gitkeep
run ~/.rvm/rubies/mput-head/bin/bundle install from "."
~/.rvm/gems/mput-head%rails3b/gems/thor-0.13.4/lib/thor/actions.rb:212:in ``':
No such file or directory - ~/.rvm/rubies/mput-head/bin/bundle install (Errno::ENOENT)
from ~/.rvm/gems/mput-head%rails3b/gems/thor-0.13.4/lib/thor/actions.rb:212:in `run'
from ~/Projects/rails/railties/lib/generators/rails/app/app_generator.rb:182:in `bundle_if_dev_or_edge'
FYI, rvm prepends some paths to PATH. They are
~/.rvm/rubies/mput-head/bin, ~/.rvm/gems/mput-head%rails3b/bin,
~/.rvm/gems/mput-head%global/bin and ~/.rvm/bin.
Any workaround?
Comments and changes to this ticket
-
Jeremy Kemper March 3rd, 2010 @ 08:11 PM
- State changed from new to open
- Assigned user set to José Valim
- Milestone cleared.
-
Prem Sichanugrist (sikachu) March 4th, 2010 @ 03:26 PM
- State changed from open to resolved
Hi Sakuro,
It seems like Carl also found this problem. He also revert the commit to use
bundle
command without detecting the full path.So I'd mark this one as resolve. You can see the commit here: http://github.com/rails/rails/commit/7979d
-
Sakuro March 4th, 2010 @ 03:35 PM
So ticket #4029 might be re-opened...
Will using File.basename from the full path of the command solve both the problem? -
José Valim March 4th, 2010 @ 04:31 PM
Yes, Sakuro, using File.basename will solve the problem. Can you please give a patch? (I reopened #4029, so you can post the patch there).
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>
People watching this ticket
Referenced by
- 4029 `ruby1.9 rails/railties/bin/rails foo --dev` will eventually call `bundle`, it should call `bundle1.9` Thor's ruby_command returns absolute path and breaks test...
- 4029 `ruby1.9 rails/railties/bin/rails foo --dev` will eventually call `bundle`, it should call `bundle1.9` gem's wrapper is not always installed in the same directo...
- 4100 commit 6f4c451 malfunctions with rvm's gemset Caio's latest branch seems to have fixed #4029 and #4100.