Blog coding and discussion of coding about JavaScript, PHP, CGI, general web building etc.

Saturday, March 19, 2016

Deploying rails: What to choose?

Deploying rails: What to choose?


I have just finished a Rails-application that I now want to upload to the web. It is a re-write of an existing application and I expect some 4 000 visitors a day with peaks to 10 000 a day at times.

  • I know Windows fairly well (have not used Windows server though).
  • I hardly know anything about Ubuntu or Linux
  • I want things nice and easy and don't want to spend too much of my time "hacking the server". I want to spend my time developing, not maintaining.
  • My budget is ~50$ a month at most for this project.
  • The database for the project is quite static (hardly any user generated data)
  • I am currently using WAMP & Mysql with Rails 3.0.3 on my local installation and it works fine most of the time but crashes quite often as well.

I am considering three ways of doing that:

  1. Using Heroku

    • Seems quite easy (even though I haven't gotten it to work yet)
    • Also seems expensive, if I need more nodes. How many nodes should I expect to need?
  2. Using a VPS Windows server

    • I know Windows and it would be fairly easy to install and get it set up
    • My friend (who is more of a Rails expert) says that Windows and Rails is not a good match.
    • My crashes on my local environment makes me nervous about this option
  3. Using a VPS Ubuntu server

    • Seems to be the cheapest option (in terms of paying up-front)
    • Seems to be the most stable option
    • I don't know Ubuntu and I am not too eager to learn a whole new OS to get this set up.

Could you help me with directions? Is Windows server really bad for Rails?

Answer by janders223 for Deploying rails: What to choose?


Quite honestly, I think Windows would be the worst choice for you. The problem with Windows and Rails is that most of the gems are never designed to work with Windows, or the versions that do work with Windows are far outdated.

Using an Ubuntu VPS is a very viable option, would be your cheapest and most stable option. We use Amazon S3 services to run most of our web servers in the cloud. Like you said, it does require you to know and understand a *nix operating system to maintain.

Maybe for you, Heroku may be the best option. Heroku is super simple to setup your project on and then deploy. There are also pages of documentation to help you along the way. In a few basic commands from the terminal, your application is running. I often use Heroku as a 'staging' server to test application updates among beta users before pushing to production on S3. You also are not required to learn a new operating system to use it.

If you are running into problems with deploying to Heroku, please post the issues and we will gladly help you.

Answer by mfrasca for

Deploying rails: What to choose?

I would advise against a windows server. From my experience, the major ruby implementations are not optimized for windows - and run slowly. For the sake of your end-users, a rails stack on Linux may provide significant performance gains (or equally decrease your server budget).

With bundler and rails 3, the amount of maintenance work on the server should be minimal. Log in, deploy, log out. (look into tools like capistrano to make this even more straightforward).

Answer by Reuben Mallaby for Deploying rails: What to choose?


By far the easiest production I've found so far is an Ubuntu server.

On Windows Rails tends to be slower and it's far simpler to setup something like passenger on *nix. If help is needed, there are more tutorials available.

My fastest setups have been Ubuntu Server and nginx.

PS. Rails 3.0 has gone beyond 3.0.3 so think about testing the latest version 8)

Answer by typeoneerror for Deploying rails: What to choose?


Heroku is delightfully easy to deploy to. If your database load is light, you can just use their shared 20GB PostgreSQL database ($15/mo). 2 dynos will cost you ($35/mo) so there's your $50 there. 2 should be fine to handle that traffic, and you can always scale during your high traffic times. Definitely would recommend adding the memcached add-on and utilize that as well. Install the New Relic add-on and you can analyze your traffic/load and scale accordingly.

Answer by Francis for Deploying rails: What to choose?


I'd heavily advise against using Windows for a rails app deployment. Some gems compile slower on Windows, and some don't work at all.

I've worked with Heroku, but there are some complications with writing files to the Heroku instance as Heroku does not allow for local file writing. When working with Heroku, people usually offload write operations like file-upload to an Amazon S3 instance or Fog. In general, Heroku is really easy to deploy to, but when configuration comes along...it may be a bit more complicated than a VPS.

The best solution for me would be to go via VPS using Ubuntu. There's been a lot of documentation done on this, and you have more options with your configurations. In actuality, it's not so much different from setting up Ruby on Rails on a local Ubuntu development machine. If you need tips on how to deploy on Ubuntu, I've just recently written a guide on how to do so.

http://www.francisbautista.com/deploying-ruby-on-rails-apps-on-a-vps-nginx-passenger-capistrano/


Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72

Related Posts:

0 comments:

Post a Comment

Popular Posts

Fun Page

Powered by Blogger.