Post

1 follower Follow
0
Avatar

Which is the best way to enter in rails's console?

I'm a new customer, I deployed my app and it works properly.

I would like to enter in rails's console (just to learn how to do it here), which is the best way to do it?

Thank you

Simone D. Answered

Please sign in to leave a comment.

1 comment

0
Avatar

Hi Simone,

Engine Yard allows customers full SSH access to instances. The easiest way to do this would be to click the "SSH" link your dashboard or SSH directly to one of your application instances and then:

cd /data/APPNAME/current

RAILS_ENV=production bundle exec rails console

For Rails 2 with bundler:

RAILS_ENV=production bundle exec script/console

For Rails 2 without bundler:

RAILS_ENV=production script/console

Note that script/console has to be chmod'd +x so that it's executable. If you get something like, "Permission denied", look at the file's owner and permissions. If it's owned by your user, do "chmod +x script/console" and try again. This is usually already set, though I have seen a few cases where it isn't.

Hope this helps! 

J. Austin Hughey 0 votes