Ruby on Rails Thursday, August 22, 2013

I have a dedicated DirectAdmin server running on CentOS and what worked for me is the following:

(Please note I make assumption you have default DA config setup with Apache/MySQL)

1. Install Ruby, and Rails gem
2. Install passenger: gem install passenger --pre
3. Install apache server module: passenger-install-apache2-module
4. Read the output from (3) and add necessary to your /etc/httpd/conf/httpd.conf. It will ask you to add few modules.
5. Create Rails app in some directory (ie. /home/SOME_USER/rails_app). This means: PROD config/database.yml has mysql config filled out, gem 'mysql2' is installed, bundle install, RAILS_ENV=production bundle exec rake db:migrate, etc.
6. Modify respective  /usr/local/directadmin/data/users/SOME_USER/httpd.conf as per instructions from point (3):

- change path within <Directory ..... > to point to  /home/SOME_USER/rails_app/public and add these two conditions:

 AllowOverride all
 Options -MultiViews

- change DocumentRoot to point to /home/SOME_USER/rails_app/public

7. Restart Apache, and you are all set. You can now access your domain.com and your app is running. Steps 1-4 are one time setup only. Steps 5-7 when you want to run additional apps. Google for additional config / tuning.


Hopefully this helps,

Kamil




On Monday, July 29, 2013 9:53:42 AM UTC-4, southi...@gmail.com wrote:
Hi,
 
With PHP applications (only experience I had before), all I needed to do is to FTP all required files, create MySQL username/pass & upload SQL structure, add this username/pass in any given config file of the php script and the app worked.
 
Can you tell me what are standard/proper steps required to deploy an app that I worked on my local Ubuntu machine and want to have it working on 'standard' web hosting company that does not specialize in Rails app hosting?
 
Thanks,
 
Rob

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/2f9d89e8-3d45-4d18-89f9-a3da71eae1e2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment