pitluga / subcontractor

rvm aware process launcher for foreman
84 stars 24 forks source link

`eof?': Input/output error - /dev/pts/2 #12

Closed dwaynemac closed 11 years ago

dwaynemac commented 12 years ago

From the following: subcontract --chdir ../contacts -- bundle exec unicorn -p 3002 -c ./config/unicorn.rb

I get this error

subcontractor-0.4.1/lib/subcontractor/cli.rb:19:in `eof?': Input/output error - /dev/pts/2 (Errno::EIO)
pitluga commented 12 years ago

Can you send me the versions of subcontractor, foreman, ruby and unicorn you are using? I'll try to recreate it.

dwaynemac commented 12 years ago

In app with Procfile:

subcontractor 0.4.1
ruby 1.9.2-p320
foreman 0.59.0

In app started by foreman + forman:

unicorn 4.3.1
ruby 1.9.2-p320
runemadsen commented 11 years ago

I'm seeing the same problem, trying to run a rails app from another folder. I'm runnning ruby-1.9.3-p374 on Ubuntu.

Procfile:

another_app:  subcontract --rvm --with-rubies default-with-rvmrc do --chdir /another_app --signal INT -- rails s -p 3001

Error:

vagrant@lucid64:/vagrant$ foreman start -f Procfile.dev
19:58:52 gitapi.1 | started with pid 17761
19:58:53 gitapi.1 | /usr/local/rvm/gems/ruby-1.9.3-p374@atlas/gems/subcontractor-0.3.0/lib/subcontractor/cli.rb:16:in `eof?': Input/output error - /dev/pts/1 (Errno::EIO)
19:58:53 gitapi.1 |     from /usr/local/rvm/gems/ruby-1.9.3-p374@atlas/gems/subcontractor-0.3.0/lib/subcontractor/cli.rb:16:in `block in run'
19:58:53 gitapi.1 |     from /usr/local/rvm/gems/ruby-1.9.3-p374@atlas/gems/subcontractor-0.3.0/lib/subcontractor/cli.rb:12:in `spawn'
19:58:53 gitapi.1 |     from /usr/local/rvm/gems/ruby-1.9.3-p374@atlas/gems/subcontractor-0.3.0/lib/subcontractor/cli.rb:12:in `run'
19:58:53 gitapi.1 |     from /usr/local/rvm/gems/ruby-1.9.3-p374@atlas/gems/subcontractor-0.3.0/bin/subcontract:5:in `<top (required)>'
19:58:53 gitapi.1 |     from /usr/local/rvm/gems/ruby-1.9.3-p374@atlas/bin/subcontract:19:in `load'
19:58:53 gitapi.1 |     from /usr/local/rvm/gems/ruby-1.9.3-p374@atlas/bin/subcontract:19:in `<main>'
19:58:53 gitapi.1 |     from /usr/local/rvm/gems/ruby-1.9.3-p374@atlas/bin/ruby_noexec_wrapper:14:in `eval'
19:58:53 gitapi.1 |     from /usr/local/rvm/gems/ruby-1.9.3-p374@atlas/bin/ruby_noexec_wrapper:14:in `<main>'
19:58:53 gitapi.1 | Could not find multi_json-1.2.0 in any of the sources
19:58:53 gitapi.1 | Run `bundle install` to install missing gems.
19:58:53 gitapi.1 | exited with code 1
19:58:53 system   | sending SIGTERM to all processes

I'm not sure whether the multi_json error is actually what's wrong, or it's subcontract breaking and then not switching gemsets.

runemadsen commented 11 years ago

Apparently you have to catch the warning exceptions. I sent a pull request.

pitluga commented 11 years ago

Awesome. Merged it in and pushed 0.5.0. Hopefully that fixes your issue.