Skip to content
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

JRuby 1.7.18 'bundle exec' command doesn't show any output #88

Open
anelson opened this issue Feb 1, 2015 · 1 comment
Open

JRuby 1.7.18 'bundle exec' command doesn't show any output #88

anelson opened this issue Feb 1, 2015 · 1 comment

Comments

@anelson
Copy link

anelson commented Feb 1, 2015

I'm running the latest Drip 0.25.0 with JRuby 1.7.18 on OS X Yosemite.

I have a simple Ruby gem library project which I'm running with JRuby. Part of my workflow includes running bundle exec rspec to run my RSpec tests.

bundle exec is a nasty little command. You can see from the Bundler source code at https://github.com/bundler/bundler/blob/d4bde24effb590c779969e9e723fd05682de4a14/lib/bundler/cli/exec.rb#L22 that it operates by mucking with the process environments variables a bit (to influence the Ruby load paths), and then basically reboots the JRuby instance by calling Kernel.exec. This is the equivalent of an exec method call.

If bundle exec is running in a JVM prepared by drip, very bad things happen. The exec call invokes calls drip just as if you'd typed a java command in the shell. The problem is that drip will then try pull another JVM out of the cache and run that as normal, which does not play well with the I/O redirection that drip uses to work. As a result, whatever command you passed to bundle exec, in my case rspec but it could be anything, runs but does not produce any output in the terminal window.

I think the correct behavior would be to detect this recursion and handle it differently. I've prepared a proof of concept fix which feels rather like a hack, but perhaps will prompt someone better versed in the art of shell scripting to suggest a proper solution. Pull request coming shortly.

anelson added a commit to anelson/drip that referenced this issue Feb 1, 2015
@anelson
Copy link
Author

anelson commented Feb 1, 2015

Pull request containing a fix for this defect is #89

kyrylo pushed a commit to kyrylo/drip that referenced this issue Nov 10, 2015
vifino pushed a commit to vifino/drip that referenced this issue May 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant