Rails: Reasonable to deploy to both internal server AND Heroku? - ruby-on-rails

Considering migrating an app to Heroku. Currently we build & test locally before deploying to our own server for hosting...But the application is growing and now wondering if it's reasonable to have, say, 3 versions of our app. One local to developer's machines. A second (testing) deployed via Capistrano to an internal server. And then finally a third on Heroku (production). Databases would not need to be shared.
Any problems or advice for this sort of scenario?

I think it's a good thing to have a staging server with the same environment as your production. So instead of internal server, wouldn't it be better to test on heroku?
For this purpose I've created another app on heroku and before updating my production app, I push my app to the staging one.
I would highly recommend the heroku_san gem which simplifies pushing app to heroku to just rake staging deploy.

I do this. I have development on developer's machines, staging, and production.
Staging is our test sandbox and sometimes also shares user databases with production so I can let users beta test, etc.
Whether or not you use Heroku for production really doesn't matter does it?

Related

Rails app with Node server on Heroku

I have a rails 5 app deployed on heroku. However, the chat features of the app is built using Node.js. While the rails app deploys fine on Heroku, the node server does not get started. How do I get the node part deployed? Does heroku allow both on a single dyno?
You can have multiple buildpacks. Here is the document that explains exactly your case https://devcenter.heroku.com/changelog-items/653

How do I move Rails App from Developement to Production environment of HostGator not Heroku?

I'm trying to put my Rails App to HostGator, but I am not sure how I should do this. I created a Rails test app and uploaded it to Heroku and it works just fine.
Now I'm trying to learn how to move from development to production environment of HostGator.
I'd really appreciate your time and share your thought on this process from development to production environment of my web hosting HostGator. Thanks!!!

Deploying a Rails app to Heroku using SmartFile

I have deployed a Rails app to Heroku but most of my images and text are stored using Postgres and are only accessible locally, so my app is incomplete. I've done a PG dump of my database and I have an account with Smartfile, but I'm not sure how to use Smartfile with Heroku. I just want my app to access my files right now. Have any of you used Smartfile in conjunction with Heroku? Any advice would be appreciated. Thanks!
I decided not to use Smartfile and just used Heroku pg:push instead, as I don't think the app will be big enough to need more than the local database.

should I be using passenger in dev to match prod for a ruby on rails project?

Should I be using passenger in dev to match prod for a ruby on rails project? (as opposed Webrick)
Noting I'll be deploying to dreamhost which uses passenger.
(Also if yes, does it have it's own web-server or do I need to install one?)
Set up a passenger staging server on your production machine. Use same configuration as pro server.
This has just saved my bacon. A recent upgrade we recently pushed broke application and took me a week to get sorted. Fortunately production server continued to function which we found prob.
Use capistrano multistage to manage the same.
You don't have to (mostly). But there might be cases where things can go wrong due to the mismatch between production & dev environment. Using staging environment will catch such issues.
If you want to test things like SSL, then webrick wont work. You need apache/nginx(or other web servers) to use passenger. I also noticed that there is no significant difference in the performance between the two options

When to start thinking about deploying my rails app

I have been testing an app and have all of the functionality worked out. Being my first go with ror I have a few questions about my next step; grateful for direction on this.
Should I do all of the design and UI before putting my app online, or after?
In trying to research this I have found three things that keep coming up as great tools to help deploy - Heroku, Capistrano, and Phusion Passenger. I know Heroku let's you deploy quickly and easily, but is this the option if I want my app at it's own URL? I currently host other websites (Wordpress) at Hostmonster, but they aren't supporting Rails 3 yet.
What is the difference between the functionality of Passenger and Capistrano? I have been searching, but not knowing some of the terminology, I'm not sure how to decipher all of it.
Go with Heroku — there's no need to clutter your brain with all of the hosting stuff since you don't already know it. Heroku is great, and you can easily have your own domain name. Point your nameservers to a.ns.zerigo.net and b.ns.zerigo.net and run…
heroku addons:add zerigo_dns
heroku domains:add example.com
heroku domains:add www.example.com
Set your domain's DNS servers to a.ns.zerigo.net and b.ns.zerigo.net.
And done deal, you're ready to deploy on Heroku. Your first dyno (app instance) is free, Zerigo's basic dns is free. You're rolling with 2TB/bandwidth (soft limit) and a whole lotta request-serving for a grand total of $0 and 15 minutes.
And for deployment, from start to finish here (provided you develop within the limitations of Heroku's platform [ie. read-only filesystem, PostgreSQL, bundler-dependent]):
heroku create yourapp
git push heroku master
heroku open # opens yourapp.herokuapp.com in your default browser
If you need to configure your DNS records:
heroku addons:open zerigo_dns
It's like magic, but it's all just solid engineering.
And to be clear, I don't work for Heroku.
Whether to finish your UI designing before going live is a decision you have to make. I don't think this will have any rails - deployment related consequences. So if you want to deploy and release fast in a rapid manner, go ahead.
You should be able to use your own domain name even if you are hosting with heroku. Take a look at this
Capistrano lets you deploy your apps with ease. So you don't have to login to your remote server and pull code from git, restart services...etc etc. You can just run cap deploy from your workstation and everything will be deployed on your server and all services will be restarted..etc.
While passenger is something like mod_php. It hosts your application. It works with apache or nginx. You will most probably end up using both capistrano and passenger. I don't think they are comparable because they do two different things.

Resources