7
votes

I am trying to run Heroku console, but in the console, I get the message "Running console attached to terminal" but the console doesn't start.

In the Heroku logs, I get the error:

 Error: no child processes attached.

Any help?

6
I'm encountering similar issue; Output from my Heroku logs: 2012-02-24T07:54:31+00:00 heroku[run.1]: State changed from created to starting 2012-02-24T07:54:38+00:00 app[run.1]: Awaiting client 2012-02-24T07:54:38+00:00 app[run.1]: Starting process with command rails console 2012-02-24T07:54:39+00:00 heroku[run.1]: State changed from starting to up 2012-02-24T07:54:39+00:00 app[run.1]: Error: undefined method `exitstatus' for nil:NilClass 2012-02-24T07:54:40+00:00 heroku[run.1]: Process exited with status 0 2012-02-24T07:54:40+00:00 heroku[run.1]: State changed from up to complete - Paul Pettengill
~/rails/recruits => heroku run rails console Running rails console attached to terminal... up, run.1 ~/rails/recruits => - Paul Pettengill

6 Answers

17
votes

I just had a thread with Heroku support about my similar issue, here was their response, which worked for me.

So this is a bamboo app. You can either do

$ heroku console

which will tap into a running web dyno, or you can run a new console as a one-off process with:

$ heroku run bundle exec rails console

On cedar apps you'd also be able to do

$ heroku run console

which also starts a one-off process, because the console process type would be implied by the rails buildpack or declared in your Procfile. It amounts to the same as the previous line.

3
votes

I was experiencing same issues.
Try

heroku run rails console

in Rails >=3

Happy coding :)

2
votes

Try

$ telnet rendezvous.heroku.com 5000 

to test the net enabled access to that port. They mention that filtered-port issue on their guide

0
votes

I think this is the same problem you're describing and it has an accepted answer which seemed to fix the issue for the guy that posted the question :-)

heroku run console returns 'Error connecting to process'

0
votes

I had this problem before I'd actually pushed my code to heroku.

Once I successfully pushed and started everything (bundle, rake etc.) the console actually worked.

-1
votes

Do this and then try In Procfile

web: bundle exec unicorn_rails -p $PORT -c config/unicorn.rb

In unicorn.rb

worker_processes 2 preload_app true timeout 30

@resque_pid = nil

before_fork do |server, worker| @resque_pid ||= spawn("bundle exec rake environment resque:work QUEUE=*") end

after_fork do |server, worker| ActiveRecord::Base.establish_connection end