• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to footer

GitopsCentral

  • Home
  • Courses
  • Roadmap
  • About
  • Log In
  • Sign Up

How to install ruby on rails on ubuntu or kali linux

January 3, 2019 by shaik zillani

Ruby_On_Rails_Logo

Introduction

In this blog post we will talk about how to install ruby on rails on ubuntu or kali linux. We will use RVM as its really easy to manage multiple ruby environments. Follow steps below to simply install the setup through command line.

Installing Ruby using RVM

logo of rvm

Ruby Version Manager is a command-line tool which allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems. Firstly, update all your packages using the command below,

sudo apt-get update

Install GPG keys used for verification of installation package.

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

Install rvm with ruby using the command below,

\curl -sSL https://get.rvm.io | bash -s stable --ruby --ignore-dotfiles

Installing Rails Server

Now, let’s install the rails server using rvm.

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

Alternatively, you can also install rails using gem command

gem install rails 5

Let’s refresh the configuration using the command below,

source /usr/local/rvm/scripts/rvm

To reinstall ruby, you can use this command,

rvm reinstall ruby 2.6.0

Setting up the path and verify installation

which ruby
ruby path

Sometimes the path doesn’t gets updated so its better we update the path in .bashrc file. Add this path (bashrc located at ~ directory) as shown below and save & close it.

updating ruby path in bashrc

Refresh the path using source command, source ~/.bashrc Let’s verify the installation using the command below,

ruby --version
ruby version
rails -v
checking rails version

Switching Ruby versions using RVM

ruby gem logo

You can always switch between ruby version easily using RVM depending on what is installed on your system, In my case I already have two versions viz; 2.5.3 and 2.6.0 use the command below to switch to 2.5.3

rvm use ruby 2.5.3

As you can see in the screenshot below, I switched from version 2.6 to 2.5

ruby version upgrade using rvm

In the next blog post we will talk about how to install ruby-mine on linux, which is the best IDE for web development using ruby on rails. Please keep checking goacademy for more engaging blogposts.

References:

  • permission denied issue
  • pg-undefined error
  • migrations pending error

ruby installation,  linux,  rails,  ruby,  ruby on rails,  rubyonrails,  rvm

Primary Sidebar

en English
ar Arabiczh-CN Chinese (Simplified)nl Dutchen Englishfr Frenchde Germanhi Hindiid Indonesianit Italianja Japanesems Malaypt Portugueseru Russianes Spanishte Telugu

Course Tags

concurrency free go golang

Recent Posts

  • Roadmap to Mastery
  • Increase SSH connection timeout
  • Check Certificate expiry in Kubernetes
  • space invaders in golang
  • creating kubernetes cluster using eksctl
  • Facebook
  • GitHub
  • YouTube

Contact

Navigation

  • goacademy pro

Footer

  • Facebook
  • GitHub
  • Instagram
  • LinkedIn
  • Twitter

info@gitopscentral.com


+91 8341443220

© Copyright 2016-2024 gitopscentral · All Rights Reserved ·