Forum: Ruby on Rails Proper rails deployment steps to DirectAdmin (or any hosting not focusing in apps) hosted server?

59acac69e85b50c9cec7bed8224e97fa?d=identicon&s=25 unknown (Guest)
on 2013-07-31 09:57
(Received via mailing list)
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
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2013-07-31 10:07
(Received via mailing list)
On Monday, July 29, 2013 2:53:42 PM UTC+1, 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?
>

While there are many ways of deploying rails applications, it's
extremely unlikely that a non rails specialist will have
installed/configured any of them. If you're looking for an easy way to
deploy a rails app, it's hard to beat heroku for simplicity.

Fred
59acac69e85b50c9cec7bed8224e97fa?d=identicon&s=25 unknown (Guest)
on 2013-07-31 21:27
(Received via mailing list)
What is most popular way to deploy apps on non-Heroku machine that has
standard Apache/MySQL setup? I would like to be able to deploy my apps
(as
I learn Rails) to my own dedicated machines. I have already installed
Ruby,
& rails gem, and I'm able to create apps on that machine without any
issues. It is when I develop something localy when I face issue as I
don't
know how to deploy it "properly"? Do I simply upload entire app folder
structure over FTP, run bundle install, config database, and start the
app
OR is there a faster/easier way?
Bee69cfed999cd13e3bff73d472a39ee?d=identicon&s=25 Hassan Schroeder (Guest)
on 2013-07-31 21:34
(Received via mailing list)
On Wed, Jul 31, 2013 at 12:26 PM,  <southierobert@gmail.com> wrote:
> What is most popular way to deploy apps on non-Heroku machine that has
> standard Apache/MySQL setup?

One option: http://www.capistranorb.com/

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Aa082c8b00a50928e5860dcd70bf2368?d=identicon&s=25 tamouse m. (tamouse_m)
on 2013-08-01 03:07
(Received via mailing list)
On Jul 29, 2013, at 8:53 AM, southierobert@gmail.com wrote:
> 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.

Yes, deploying PHP is quite simple compared to Rails.

> 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?

I don't have anything written (which I should) but just googling around,
here's a few:

*
http://blog.sudobits.com/2013/01/07/how-to-deploy-...
* http://rubysource.com/deploying-a-rails-application/
*
http://tommy.chheng.com/2013/01/23/deploying-a-rai...

There's also a pragprog book:
http://pragprog.com/book/cbdepra/deploying-rails which I haven't read.

If you hosting solution does not offer shell access, it's going to be
very difficult, I think to do an effective deploy. Even moreso if your
application requires gems that need to have native extensions compiled.

There are some great Rails-hosting PaaS out there: heroku, EngineYard,
CloudFront, etc.

My most recent job, we used AWS to host our app, and deployed using Chef
(opscode.com) which was really nice to work with.
A391cac3d9e04f12bd172cb2bacb080d?d=identicon&s=25 kaichanvong (Guest)
on 2013-08-01 16:38
(Received via mailing list)
I've found Nitrous really nice for testing apps somewhere in the cloud:
https://www.nitrous.io/join/WWm_3k15gFU

They encourage you to deploy apps (as others suggest) to heroku.

NB. I've no affiliation to Nitrious, but that link does include my
referral
code for more Nitrous points.
4d88b27e8a96627b4cfbdbae93f59d37?d=identicon&s=25 Kamil (Guest)
on 2013-08-22 18:38
(Received via mailing list)
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
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.