Home > Uncategorized > Install Ruby on Rails · Ubuntu Linux

Install Ruby on Rails · Ubuntu Linux

Thursday, 22 September, 2016 Leave a comment Go to comments

Prepare Your System

Update your package manager first:

$ sudo apt-get update

Install Curl

$ sudo apt-get install curl

Install Ruby Using RVM

The RVM website explains how to install RVM. Here’s the simplest way:

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

RVM will install the newest stable Ruby version. You can check for the current recommended version of Ruby.

If You Already Have RVM Installed

If you already have RVM installed, update it to the latest version and install Ruby:

$ rvm get stable --autolibs=enable
$ rvm install ruby
$ rvm --default use ruby-2.3.1

Install Node.js

Since Rails 3.1, a JavaScript runtime has been needed for development on Ubuntu Linux. The JavaScript runtime is required to compile code for the Rails asset pipeline. For development on Ubuntu Linux it is best to install the Node.js server-side JavaScript environment.

$ sudo apt-get install nodejs

and set it in your $PATH.

If you don’t install Node.js, you’ll need to add this to the Gemfile for each Rails application you build:

gem 'therubyracer'

Check the Gem Manager

RubyGems is the gem manager in Ruby.

Check the installed gem manager version. You may see:

$ gem -v
2.3.1

At the time this was written, a newer RubyGems version was available. Use gem update --system to upgrade the Ruby gem manager:

$ gem update --system

©

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: