Skip to content

Instantly share code, notes, and snippets.

@tehviking
Created December 6, 2011 22:50
Show Gist options
  • Save tehviking/1440411 to your computer and use it in GitHub Desktop.
Save tehviking/1440411 to your computer and use it in GitHub Desktop.
jruby-head & torquebox-rake-support gem conflict
def exec_command(cmd)
IO.popen4( cmd ) do |pid, stdin, stdout, stderr|
trap("INT") do
puts "caught SIGINT, shutting down"
`taskkill /F /T /PID #{pid}` if windows?
end
stdin.close
[
Thread.new(stdout) {|stdout_io|
stdout_io.each_line do |l| # This is the line throwing the error... 295
STDOUT.puts l
STDOUT.flush
end
stdout_io.close
},
Thread.new(stderr) {|stderr_io|
stderr_io.each_line do |l|
STDERR.puts l
STDERR.flush
end
}
].each( &:join )
end
end
JRuby 1.6.5 works great. jruby-head breaks here.
$ rake torquebox:run --trace
** Invoke torquebox:run (first_time)
** Invoke torquebox:check (first_time)
** Execute torquebox:check
TorqueBox installation appears OK
TorqueBox Server OK: /Users/bhays/torquebox-current/jboss/standalone
** Execute torquebox:run
rake aborted!
Stream closed
org/jruby/RubyIO.java:3176:in `each_line'
/Users/bhays/.rvm/gems/jruby-head/gems/torquebox-rake-support-2.0.0.beta1/lib/torquebox/deploy_utils.rb:295:in `exec_command'
Tasks: TOP => torquebox:run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment