Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you run a rails console or rake command in the elastic beanstalk environment?

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 effectively empty. If I move up a directory, there is also a /home/webapp directory that i do not have access to.

Is there a way to run a rake command or rails console on my elastic beanstalk instance?

If I type rails console I get Usage: rails new APP_PATH [options] If I type RAILS_ENV=production bundle exec rails console, I get "Could not locate Gemfile"

like image 578
gitb Avatar asked Oct 27 '13 17:10

gitb


People also ask

What two types of environments can be created when using Elastic Beanstalk?

In AWS Elastic Beanstalk, you can create a load-balanced, scalable environment or a single-instance environment. The type of environment that you require depends on the application that you deploy.

Which AWS services can be used with Elastic Beanstalk?

Elastic Beanstalk uses core AWS services such as Amazon Elastic Compute Cloud (EC2), Amazon Elastic Container Service (ECS), AWS Auto Scaling, and Elastic Load Balancing (ELB) to easily support applications that need to scale to serve millions of users.

When should you not use Elastic Beanstalk?

Elastic Beanstalk isn't great if you need a lot of environment variables. The simple reason is that Elastic Beanstalk has a hard limit of 4KB to store all key-value pairs. The environment had accumulated 74 environment variables — a few of them had exceedingly verbose names.

What does Elastic Beanstalk run on?

AWS Elastic Beanstalk is an easy-to-use service for deploying and scaling web applications and services developed with Java, . NET, PHP, Node. js, Python, Ruby, Go, and Docker on familiar servers such as Apache, Nginx, Passenger, and IIS.


1 Answers

For rails, jump to /var/app/current then as @juanpastas said, run RAILS_ENV=production bundle exec rails c

like image 125
kross Avatar answered Oct 08 '22 18:10

kross