I have set up a RoR environement on AWS\' elastic beanstalk. I am able to ssh into my EC2 instance. My home directory is /home/ec2-user, which is effective
None of the other answers worked for me so I went looking - this is working for me now on an elastic beanstalk 64bit amazon linux 2016.03 V2.1.2 ruby 2.2 (puma) stack
cd /var/app/current
sudo su
rake rails:update:bin
bundle exec rails console
that returns me the expected console
Loading production environment (Rails 4.2.6)
irb(main):001:0>