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
Calling a different rbenv ruby using backticks from a rake task running via rbenv errors #776
Comments
If, just prior to shelling out to jruby, you delete some env variables as follows...
... and modify the RBENV_VERSION to point at jruby...
... and modify Will look into how to replace this ENV variables temporarily in order to launch the jruby subscript. |
Finally, a working solution. Here is an example rake task where the environment will be jruby-based within the
|
Thanks for sharing the solution. This is a known problem. Please see #121 |
Overview
Given we have ruby and 2.2.2 and jruby-9.0.0.0 both installed via rbenv
When we call a rake task using RBENV_VERSION=2.2.2
And that rake task calls a jruby script using backticks
Then we get the error...
Example app
Example rails app at https://github.com/theirishpenguin/rails_app_calling_jruby_script which features an example task that showcases this ( https://github.com/theirishpenguin/rails_app_calling_jruby_script/blob/master/lib/tasks/demo_task.rake)
Steps to reproduce using demo app
Now try without rbenv when calling the rake task
... # Ensure you are still in the rails_app_calling_jruby_script directory
Also
The text was updated successfully, but these errors were encountered: