Setting up Amazon Webservices for Rails - ruby-on-rails

I've been trying to set up a web server using EC2 on Amazon web services.
Using the appstack-nginx-passenger-ree AMI, I tried to set up the server.
I put my ruby files in /opt/sites and I installed passenger and apache2-dev & apace2-mpm-fork.
I had to set up the apache config file.
Afterwards what should I do?
How do I set the path file of the ruby files and deploy them?
How can I start up the server and be able to look at it?

You should make sure you start up apache (which should show you a default welcome page on your the IP of you box (if you have opened up the firewall)), then setup the path to your ruby project in your httpd.conf file.
Here's a guide that might help you out

Paul, your link is broken, the corrected link for the guide is this Setting up Rails 3 on Amazon EC2 instance

Related

Connecting Rails to AWS MySQL database

I've recently created a rails app. I pushed the initial files onto github.
My problem is that I want to connect my rails app to AWS in order to use a MySQL database. I keep seeing tutorials on EC2 and Beanstalk, but I am not sure which one I should use. I have all the drivers needed for ruby through the gem installations.
I'm looking to figure out the main differences between Beanstalk and created a MySQL instance as well as what to put in my database.yml file in my rails app to connect to a database. Thank you in advance!
Just to give an idea, after you provision/create your instance on AWS (EC2 or wherever), you will then push your app's code to that remote server somewhere. You can do it manually via scripts, or you can use Capistrano for this. Once your app is deployed to the server, you need to connect to the server via SSH and manually edit the config/database.yml file to point to the staging/production MySQL database. (I'm generalizing, but I think you just need a step in the right direction.)

How to deploy a Ruby on Rails app to AWS-EC2 Ubuntu Linux using Apache 2?

We want to configure Apache to work with a Rails app. We want Apache to do load control. We cannot get them to work together. We are using MySQL for the database. If we could please have some type of instruction or tutorial to follow to be able to deploy our application in AWS-EC2, it will be greatly appreciated.
We have a domain and we want to have multiple Rails app running in the same domain. Each rails app seems to want to run in a different port. We do not want to expose port 80/443. Apache is managing the inbound request. My attempts to use the host file has not been successful.

Can i host a rails app via hostgator and FTP

Can you deploy a ruby on rails application to hostgator via FTP. if you Can, Can you guys please Tel me how i do it :) do you have to put something inside your project or is there another Way to host via hostgator?
Greetings from Ludvig.
Any kind of help would be greatly appreciated :)
If you buy hostgator VPS you can deploy rails application. You can not deploy your rails app (like version 4) on the Shared hosting of hostgator.
FTP is not important issue. You can upload your source code via FTP or other way like cloning from git repo. To deploy the rails app your hosting server must install Rails, Ruby and other packages.

Setting up Rails on Hostmonster

I'm able to run rails s through ssh successfully and see the app start up just as it does on my own machine but I'm unable to access the app from the web. The app is directly under the home folder and I have a symbolic link pointing from public_html to the public folder of my rails app, just as this tutorial explains. I even tried setting up a subdomain and every other step in the tutorial to no avail. Any help would be highly appreciated.
You need an application server like Phusion Passenger, Unicorn or puma to run a Ruby app in a production environment. Typically, you'll integrate the application server into a web server's (Apache, nginx) environment.
I don't know about your hoster, but if you have root access, then you can probably use any of these application servers.
The built-in server you start by running rails server is only meant for testing purposes on your local machine. It has not been made with security, performance, stability or any other production-environment criteria in mind.

Setting up Apache for Rails production

I am developing a Rails 3 application and I have installed Capistrano on the client side and Passenger with Apache 2 on the server side.
I make a deployment and the files are sent to a folder called u/apps/.
But when I visit the IP address I am currently using I only get to an empty folder, how do I configure Apache to look for my app in the current folder? So that I only need to visit my IP/domain to see my app?
I have done this using Rails 2.x but I think for Rails 3 also pretty much the same thing. For this you need to use Passenger and then configure Apache.
Following are some useful resources
http://www.modrails.com/install.html
http://railscasts.com/episodes/122-passenger-in-development
If you browse to your URL and you see an apache files/folders list that means that passenger is not triggered for that location...
Test your server environment by running a mongrel/thin in your application folder and see that your application runs correctly. After that, look at your Apache configuration (see Passenger docs).

Resources