Follow the download link, and run the resulting installer. This is an exe file rubyinstaller 2. Its a very small package, and youll get Ruby. Gems as well along with this package. Please check the Release Notes for more detail. Step 3 Install Rails. Install Rails With Rubygems loaded, you can install all of Rails and its dependencies using the following command through the command line. C gem install rails. The Heroku Postgres addon is a production database service, offering PostgreSQL, readonly follower databases, snapshots for forks, and local client access. Ruby on Rails Installation Learn Ruby on Rails in simple and easy steps. You will learn its Introduction, Installation, Framework, Directory Structure, strengths. Learn Web Design Development with SitePoint tutorials, courses and books HTML5, CSS3, JavaScript, PHP, mobile app development, Responsive Web Design. Note The above command may take some time to install all dependencies. Make sure you are connected to the internet while installing gems dependencies. Step 4 Check Rails Version. Use the following command to check the rails version. C rails v. Congratulations You are now on Rails over Windows. Rails Installation on Linux. We are installing Ruby On Rails on Linux using rbenv. It is a lightweight Ruby Version Management Tool. The rbenv provides an easy installation procedure to manage various versions of Ruby, and a solid environment for developing Ruby on Rails applications. Follow the steps given below to install Ruby on Rails using rbenv tool. Step 1 Install Prerequisite Dependencies. First of all, we have to install git core and some ruby dependences that help to install Ruby on Rails. Use the following command for installing Rails dependencies using yum. Step 2 Install rbenv. Now we will install rbenv and set the appropriate environment variables. Use the following set of commands to get rbenv for git repository. PATH HOME. rbenvbin PATH. SHELL. tp git clone git github. PATH HOME. rbenvpluginsruby buildbin PATH lt lt. SHELL. Step 3 Install Ruby. Before installing Ruby, determine which version of Ruby you want to install. We will install Ruby 2. Use the following command for installing Ruby. Use the following command for setting up the current Ruby version as default. Use the following command to verify the Ruby version. X8. 66. 4 linux. Ruby provides a keyword gem for installing the supported dependencies we call them gems. If you dont want to install the documentation for Ruby gems, then use the following command. Thereafter, it is better to install the Bundler gem, because it helps to manage your application dependencies. Use the following command to install bundler gem. Step 4 Install Rails. Use the following command for installing Rails version 4. Use the following command to make Rails executable available. Use the following command for checking the rails version. Rails 4. 2. 4. Ruby on Rails framework requires Java. Script Runtime Environment Node. Rails. Next, we will see how we can use Node. Asset Pipeline which is a Rails feature. Step 5 Install Java. Script Runtime. Let us install Node. Yum repository. We will take Node. EPEL yum repository. Use the following command to add the EPEL package to the yum repository. Use the following command for installing the Node. Congratulations You are now on Rails over Linux. Step 6 Install Database. By default, Rails uses sqlite. My. SQL, Postgre. SQL, or other RDBMS. This is optional if you have the database installed, then you may skip this step and it is not mandatory that you have a database installed to start the rails server. For this tutorial, we are using Postgre. SQL database. Therefore use the following commands to install Postgre. SQL. tp sudo yum install postgresql server postgresql contrib. Accept the prompt, by responding with a y. Use the following command to create a Postgre. SQl database cluster. Use the following command to start and enable Postgre. SQL. tp sudo systemctl start postgresql. Keeping Rails Up to Date. Assuming you have installed Rails using Ruby. Gems, keeping it up to date is relatively easy. We can use the same command in both Windows and Linux platform. Use the following command. Output. The following screenshot shows a Windows command prompt. The Linux terminal also provides the same output. This will automatically update your Rails installation. The next time you restart your application, it will pick up this latest version of Rails. While using this command, make sure you are connected to the internet. Installation Verification. You can verify if everything is set up according to your requirements or not. Use the following command to create a demo project. Output. It will generate a demo rail project we will discuss about it later. Currently we have to check if the environment is set up or not. Next, use the following command to run WEBrick web server on your machine. It will generate auto code to start the server. Now open your browser and type the following. It should display a message, something like, Welcome aboard or Congratulations.