0

What's the correct way of sending a command to heroku console on Cedar?

heroku console 2+2 works on older stacks - it warns me to use heroku run console on cedar.

When I run

heroku run console 2+2

it loads the unwanted "2+2" environment and opens up a console.

Loading 2+2 environment (Rails 3.2.3)
irb(main):001:0> 

So what's the proper way of sending a command to heroku console on Cedar?

shime
  • 8,746
  • 1
  • 30
  • 51

1 Answers1

1

It's not the prettiest solution, but piping the command in did work.

echo "2 + 2" | heroku run console

Looking at the code, it appears there is no (current) built in way to do it.

Gazler
  • 83,029
  • 18
  • 279
  • 245
  • 1
    yeah, couldn't find it either. there is no other workaround? when I execute this, I can't exit the console normally and I have to stop the process. thanks for your answer – shime Apr 25 '12 at 14:25
  • I think you may be able to run a detached console with `heroku run:detached console` but I'm not 100% sure. – Gazler Apr 25 '12 at 14:40