Deploying Rails 4 in production on windows apache MySQL

By | December 11, 2017

We have deployed Rails 4.1.0 / Ruby 2.1.6 on a windows 12 server in development mode with MySQL, using the WeBrick web server. We are now looking to deploy the application to production environment with rails 4.1.0, ruby 2.1.6, windows 12 server, MySQL server 5.6, and apache with Mongrel or XAMPP

Could you point us to the steps / suggestions and ideas to help deploy our rails application to production


From experience: the best thing to do is to forget about windows deployment. If this is not an option, then maybe look into JRuby and Warbler. Just don’t expect:

  • much help from the community (because “nobody” deploys on windows)
  • comfortable worfkflow
  • stuff that works out of the box

Also i don’t see why you would need XAMPP?


If you are at your first attempts on deploying I’d recommend you Heroku.


The nice benefit is you can install addons (eg. a mysql database) in a matter of clicks:

Steps are really easy:


# Install the `Heroku Toolbelt`
# inside Gemfile: gem 'rails_12factor', group: :production
# [git init & commit]
$ heroku login
$ apps:create my-app-name # run `heroku create --help` for further help
$ heroku addons:create jawsdb # mysql addon for `heroku`
$ git push heroku master
$ heroku run rake db:schema:load


After a while you may realize although it’s easy to deploy you’ll want more tuning and probably better pricing.
At that point usually comes AWS, which has a good balance of all this, I’d recommend you Elastic Beanstalk.

  • Install EB CLI 3
  • Setup git
  • $ eb init
  • $ eb use your-environment-name
  • $ eb deploy
  • $ eb ssh # to enter into the machine

Leave a Reply

Your email address will not be published. Required fields are marked *