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

Change allows ember-cli-rails to work under jruby-9.0.3.0 #241

Closed
wants to merge 1 commit into from

Conversation

softwareanimal
Copy link

There may be a better fix for this. I doubt that this change should be merged as it is.

Without this change, I get an error after running app.rb line 44:
@pid = exec(cmd, method: :spawn)

Using ruby-2.2.2 there is no problem. With 'rvm use jruby-9.0.3.0' the error is as follows :

Java::JavaLang::ArrayIndexOutOfBoundsException (-2):
org.jruby.util.io.PopenExecutor.run_exec_dup2(PopenExecutor.java:789)
org.jruby.util.io.PopenExecutor.execargRunOptions(PopenExecutor.java:986)
org.jruby.util.io.PopenExecutor.spawnProcess(PopenExecutor.java:113)
org.jruby.util.io.PopenExecutor.spawn(PopenExecutor.java:75)
org.jruby.RubyProcess.spawn(RubyProcess.java:1296)
org.jruby.RubyKernel.spawn(RubyKernel.java:1509)
...

@seanpdoyle
Copy link
Contributor

@softwareanimal thanks for the contribution!

Keep in mind, App#exec isn't the same as Kernel.exec.

Invoking App#exec usually runs system, but it can be configured to run spawn.

Could you verify which invocation of App#exec is causing the issue?

@softwareanimal
Copy link
Author

app.rb near line 342 is the changed line, and where the error happens :
Kernel.public_send(method_name, env_hash, cmd, err: :out)

The 'method_name' variable prints out as 'spawn' and 'method: :spawn' is passed in from app.rb near line 52 (not app.rb line 44 as I stated before):
@pid = exec(cmd, method: :spawn)

Not sure if this is related to the question.

Again, I am not sure that you want to merge a change to support jruby-9.0.3.0. Also not sure what change you would merge. I just opened this pull request to report what worked under this environment and what does not work.

@seanpdoyle
Copy link
Contributor

@softwareanimal thanks for the context. I'll try looking into this and I'll ping you if I need more info.

@nadavshatz
Copy link

👍

seanpdoyle added a commit that referenced this pull request Nov 17, 2015
Closes [#241].

Redirects `STDERR` to `STDOUT` via the `STDOUT` file descriptor (as
described in the [`Kernel#spawn`][spawn] documentation).

Related to [jruby/jruby#3038].

Covered by [ruby/rubyspec].

[#241]: #241
[spawn]: http://ruby-doc.org/core-2.2.3/Kernel.html#method-i-spawn
[jruby/jruby#3038]: jruby/jruby#3038
[ruby/rubyspec]: https://github.com/ruby/rubyspec/blob/bfc40c3d73cc822e436b69b20967cf9b0eb7a4d8/shared/process/spawn.rb#L363-L369
@seanpdoyle
Copy link
Contributor

@softwareanimal thank you so much for bringing this to our attention.

A fix is being tracked in #288.

Closing in favor of #288

@seanpdoyle seanpdoyle closed this Nov 17, 2015
seanpdoyle added a commit that referenced this pull request Nov 17, 2015
Closes [#241].

Redirects `STDERR` to `STDOUT` via the `STDOUT` file descriptor (as
described in the [`Kernel#spawn`][spawn] documentation).

Related to [jruby/jruby#3038].

Covered by [ruby/rubyspec].

[#241]: #241
[spawn]: http://ruby-doc.org/core-2.2.3/Kernel.html#method-i-spawn
[jruby/jruby#3038]: jruby/jruby#3038
[ruby/rubyspec]: https://github.com/ruby/rubyspec/blob/bfc40c3d73cc822e436b69b20967cf9b0eb7a4d8/shared/process/spawn.rb#L363-L369
@seanpdoyle
Copy link
Contributor

@softwareanimal @nadavshatz could you please checkout the branch on #288 and give it a shot?

seanpdoyle added a commit that referenced this pull request Nov 19, 2015
Closes [#241].

No longer redirects `STDERR` to `STDOUT` via the `STDOUT` file
descriptor (as described in the [`Kernel#spawn`][spawn] documentation).

Related to [jruby/jruby#3038].

Uses `poltergeist` instead of `capybara-webkit`.

Unfortunately, testing for `jruby` support is impossible until
[thoughtbot/capybara-webkit#725][#725] is resolved.

[#241]: #241
[spawn]: http://ruby-doc.org/core-2.2.3/Kernel.html#method-i-spawn
[jruby/jruby#3038]: jruby/jruby#3038
[#725]: thoughtbot/capybara-webkit#725
seanpdoyle added a commit that referenced this pull request Nov 19, 2015
Closes [#241].

No longer redirects `STDERR` to `STDOUT` via the `STDOUT` file
descriptor (as described in the [`Kernel#spawn`][spawn] documentation).

Related to [jruby/jruby#3038].

Uses `poltergeist` instead of `capybara-webkit`.

Unfortunately, testing for `jruby` support is impossible until
[thoughtbot/capybara-webkit#725][#725] is resolved.

[#241]: #241
[spawn]: http://ruby-doc.org/core-2.2.3/Kernel.html#method-i-spawn
[jruby/jruby#3038]: jruby/jruby#3038
[#725]: thoughtbot/capybara-webkit#725
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants