Different versions of Ruby can be compiled and installed into arbitrary directories using the Ruby-install. In MacOs and Linux machines, Chruby is a tool which is provided to toggle between different Ruby versions installed the same machine. The Ruby on Rails installation process is not that complicated, and I will be discussing here, the way to install Ruby on Rails both on Windows. The process given in this step by step tutorial cum article for the installation of Ruby on Rails is same for Windows 10, Windows 7 and Windows 8.1. Let's have look. After installing the kit, check out the Rails Guides for information about developing Ruby on Rails applications. Another great resource is the Ruby on Rails Tutorial by Michael Hartl. While the tutorial is Mac-focused, it does provide great value and insight for Windows users as well.
To develop a web application using Ruby on Rails Framework, you need to install the following software −
We assume that you already have installed a Web Server and a Database System on your computer. You can use the WEBrick Web Server, which comes with Ruby. Most websites however use Apache or lightTPD web servers in production.
Rails works with many database systems, including MySQL, PostgreSQL, SQLite, Oracle, DB2 and SQL Server. Please refer to a corresponding Database System Setup manual to set up your database.
Let's look at the installation instructions for Rails on Windows and Linux.
Rails Installation on Windows
Follow the steps given below for installing Ruby on Rails.
Step 1: Check Ruby Version
First, check if you already have Ruby installed. Open the command prompt and type ruby -v. If Ruby responds, and if it shows a version number at or above 2.2.2, then type gem --version. If you don't get an error, skip Install Ruby step. Otherwise, we'll install a fresh Ruby.
Step 2: Install Ruby
If Ruby is not installed, then download an installation package from rubyinstaller.org. Follow the download link, and run the resulting installer. This is an exe file rubyinstaller-2.2.2.x.exe and will be installed in a single click. It's a very small package, and you'll get RubyGems 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 −
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 VersionWindows 10 App Store Not Downloading An…
Use the following command to check the rails version.
Apple System Profiler inApple System Profiler inThe Apple System Profiler has been with computers since around the time of. System profiler report mac. As the name suggests, it is an application created to gather detailled information on the Mac it is still on. This information can then be sent or be divulged with in tech support cases, amongst other uses.Mac OS 7.6 through Mac OS 9.2.2The Apple System Profiler was a.
Output
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.
Ruby DownloadStep 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.
Step 3: Install Ruby
Before installing Ruby, determine which version of Ruby you want to install. We will install Ruby 2.2.3. 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.
Output
Ruby provides a keyword gem for installing the supported dependencies; we call them gems. If you don't 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.2.4.
Use the following command to make Rails executable available.
Use the following command for checking the rails version.
Output
Ruby on Rails framework requires JavaScript Runtime Environment (Node.js) to manage the features of Rails. Next, we will see how we can use Node.js to manage Asset Pipeline which is a Rails feature.
Step 5: Install JavaScript RuntimeHow To Install Ruby Windows 7
Let us install Node.js from the Yum repository. We will take Node.js from EPEL yum repository. Use the following command to add the EPEL package to the yum repository.
Use the following command for installing the Node.js package.
Congratulations! You are now on Rails over Linux.
Step 6: Install Database
By default, Rails uses sqlite3, but you may want to install MySQL, PostgreSQL, 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 PostgreSQL database. Therefore use the following commands to install PostgreSQL.
Accept the prompt, by responding with a y. Use the following command to create a PostgreSQl database cluster.
How To Install Ruby Windows 5
Use the following command to start and enable PostgreSQL. Vmware vsphere web client download 6.0.
Keeping Rails Up-to-Date
Assuming you have installed Rails using RubyGems, 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.
Ruby For Windows
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.
It is a camera app with tons of amazing filters and edits available on the, It is loaded with tons of amazing features which makes you look even more beautiful or handsome or good-looking than in real, With this sweet selfie app you can get trendy filters, auto beauty feature, blur feature etc. Sweet Selfie CameraAmong all the popular selfie apps like candy camera, etc available in the play store sweet selfie camera apps download is the best application and also considered to be one of the top 5 camera apps in the google play photo galley in more than 50 countries. Download camera for laptop window 7.
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
How To Install Ruby Gems Windows
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
How To Install Ruby Gem On Windows 10
Now open your browser and type the following −
It should display a message, something like, 'Welcome aboard' or 'Congratulations'.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |