Ruby on Rails Session 1: How to build a Ruby on Rails on the Ubuntu.

Source: Internet
Author: User
About Ruby on Rails

Ruby on Rails is an application stack that provides developers with a framework to quickly create a variety of Web applications. ruby on Rails does take a little while to install on a virtual server, but luckily there are a lot of helpful tools to make this process as easy as possible. you can run this tutorial on your droplet as a user with Sudo privileges. you can check out how to set that up here: Ubuntu Server SETUP

Step one-install Ruby with rvm

Before we do anything else, we shocould run a quick update to make sure that all of the packages we download to our VPs are up to date:

sudo apt-get update

Once that's done, we can start installing rvm, Ruby version manager. this is a great program that lets you use several versions of Ruby on one server; however, in this case, we will just use it to install the latest version of Ruby on the droplet.

If you do not have curl on your system, you can start by installing it:

sudo apt-get install curl

To install rvm, open terminal and type in this command:

\curl -L https://get.rvm.io | bash -s stable

After it is done installing, load rvm. You may first need to exit out of your shell session and start up a new one.

source ~/.rvm/scripts/rvm

In order to work, rvm has some of its own dependences es that need to be installed. to automatically install them:

rvm requirements

You may need to enter your root password to allow the installation of these dependencies.

On occasion the zlib package may be reported as missing. The rvm page describes the issue and the solution in greater detail here.

Step two-install Ruby

Once you are using rvm, installing Ruby is easy.

rvm install ruby

The latest Ruby is now installed. However, since we accessed it through a program that has a variety of Ruby versions, we need to tell the system to use the version we just installed by default.

rvm use ruby --default
Step three-install rubygems

The next step makes sure that we have all the required components of Ruby on Rails. We can continue to use rvm to install gems; type this line into terminal.

 rvm rubygems current
Step four-install rails

Once everything is set up, it is time to install rails. To start, open terminal and type in:

gem install rails

This process may take a while, be patient with it. Once it finishes you will have Ruby on Rails installed on your droplet.

 

 

-- Source to network.

Ruby on Rails Session 1: How to build a Ruby on Rails on the Ubuntu.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.