After installing the rails, how can I run the rail server on the amazon ec2 instance?


I installed rails on an instance on amazon AMI. I installed all the dependencies for rails. I even copied the code through scp. When i ssh to the instance i ran

rails s

The server is running. How can I view it from the browser? from the Public DNS???

Your amazon ec2 instance has a public ip address and domain name, see

use this domain name as the URL in your browser.

You will also have to set inbound traffic / port connections in the security group of the instance.

A word of warning: with "rails s" you are starting webrick, a server that is only meant to be used in development. You probably should use a production server like apache + mod_passenger.

For more advanced usage of ec2 and ruby on rails see