-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for bundler path issue in Cucumber Rake task #386 #388
Conversation
@@ -92,7 +92,7 @@ def gem_available_new_rubygems?(gemname) | |||
|
|||
def cmd | |||
if use_bundler | |||
bundle_cmd = Gem.default_exec_format % 'bundle' | |||
bundle_cmd = File.basename( Gem.bin_path('bundler', 'bundle') ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please extract this code into separate method. To remove code duplication and make this code more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've extracted the duplicate as ForkedCucumberRunner#bundle_cmd
method. d08dc89
It looks like jruby is also affected by the problem, and the fix works for it too. |
I've been checking the rubygems source code, and found out that this
|
Hm, I've re-read #324 and I'm not sure it fix a real problem :( At least when I've built ruby with --program-prefix and --program-suffix and than installed bundler, I still have bundle binary, not bundle. |
Reverting #324 will fix the problem I'm facing, so that will be fine for me. |
I agree there is a possibility to break something (again) but since #324 was integrated into 1.2.2 and it breaks more common situations (such as jruby and mri installed using apt-get on ubuntu) I think it is safer to simply revert the changes and allow the contributor or someone else to re-fix the problem with possible prefix/suffix of bundler's binary. |
@y-higuchi thank you very match for your deep evaluation of the problem it helps us a lot. |
@os97673 No problem. It's nothing compared to all the benefit this project has provided me. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This is a fix for #386.
It changes the method to obtain the
bundle
command name fromGem.default_exec_format % 'bundle'
toFile.basename( Gem.bin_path('bundler', 'bundle') )
when building the command line in Cucumber Rake task.