• Home
  • About Team IndiaBook
  • Provide Feedback

India Book

  • Home
  • Business & Economy
  • National
  • News
  • Culture
  • History
  • Travel & Food
  • LifeStyle

How To Deploy Ruby On Rails App On VPS?

Technology

This blog will help you to deploy Ruby on Rails app on VPS. Remember, this is not a free solution, but you can well afford it and can code on Ruby without the paywall drawbacks.

If you are not confident enough to workout these on your own you can always rely on ruby on rails developer India.

It is not necessary to explore the DevOps.

Things you need to do:

  1. Clone the repository from chef-vps and then follow the instructions from README present there. You need to know the basics of the stand also you need to know how to fire a shell command. If you know these basics, you are good to go!

The goal is to serve multiple applications on a single machine using sub domains. To do this, firstly we need a server and to have a server, you need to buy a VPS. The cheapest VPS according to me is the Digital Ocean. It provides a 5$ per month plan. This should be enough for you to develop a few applications at the start.

When you create your VPS, you can choose an Operating System or OS, which can be a great starting point for your development. If you want your server to run RoR apps, you need to install different tools. You can find all the apps and can install them from chef solo and cook books provided by the chef community.

If you want to run RoR on your server, you need to install many tools:

Tools:  

  • Chef solo
  • Knife solo
  • Bundler
  • Librarian chef
  • Nginx
  • postgreSQL
  • unicorn
  • rbenv

Now, Setting up your VPS:

First things first. To begin, the VPS is needed to connect through the ssh.

Suppose we have a VPS. We can connect it through $ ssh vps.com.

The domain name is required as we need to serve applications using sub domains.

To run RoR applications, VPS needs ruby, unicorn etc. Chef solo will help us to install tools.

VPS needs a node under the nodes/directory. The nodes have their own functions and will run accordingly.

  • Boot strap(setting up  locale, install nodejs, rbenv)
  • Web(ngnix)
  • Database(postgresql)

Point to be noted: You need to install gems before you start cooking VPS: $ bundle install.

If you want cook books, you can get it from  $ librarian-chef install.

Now the important part. If you want to prepare and cook VPS, run: knife solo bootstrap vps.

Now you have your RoR app ready!

You need to share it now in order to show the world.

To do this, you need to create a role for the application which runs the “rails_app” recipe. The application will be available under the sub domain. You again need to create a node to run the application. To cook this node you need the ssh config.

RAILS Application: You need to add Capistrano and unicorn gems to Gemfile.The next step is to bundle new gems, $ bundle install.

Now create a cap file into the application root folder.

Create config/deploy.rb file and also create a production deployment config file.

You need to add database.yml and secret.ymlto.gitignore as those files are already on VPS.

You are almost done. Deploy your application on VPS finally using $ bundle exec cap production deploy.

These were the solutions for deploying Ruby on the Rails, if you think you are not capable enough of doing the following on your own always go for ruby on rails developer india.

Leave a Comment

Previous Post: « Are You Confused? Study BBA For These Reasons
Next Post: How To Attain Absolute Pleasure From Online Casino Games? »

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Search About India

Read About Us

Hi Friends!

We are team India Book. We are happy to announce our blog relaunch with a really new, unique and user-friendly and mobile responsive design making it a big hit now! So reader please continue visiting our blog to read more about India.

Thanks.

Indira Gandhi International Airport

2017/06/Indira-Gandhi-International-Airport-300x225.jpg

MIle Sur Mera Tumhara….

https://youtu.be/-jf6pwtPqCs

Incredible India

More Topics…..

  • Arts & Humanities
  • Automotive
  • Business & Economy
  • Computers & Internet
  • Education
  • Entertainment
  • Fashion
  • General
  • Government
  • Health
  • Kids and Teens
  • News & Media
  • Pay Per Click
  • Political news
  • Recreation & Sports
  • Regional
  • Science
  • Search Engine
  • Shopping
  • Society & Culture
  • Sports
  • Technology
  • Telecommunications
  • Travel & Tourism
  • Web Hosting
  • Web Services

Copyright © 2025 · India Book All Rights Reserved

Privacy Policy

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkPrivacy policy