May 1, 2016
1 minutes to readHow to install Ruby on Linux
We will be setting up Ruby development environment on Ubuntu 16.04.
Since Ubuntu is one of the easiest linux distribution and is used by many people, we will start with it.
Installing Ruby
Step 1: Install dependencies for Ruby
We will use rbenv
for setting up the environment. For this we will have to setup rbenv first.
cd
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
git clone https://github.com/rbenv/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
rbenv install 2.3.0
rbenv global 2.3.0
ruby -v
Then we need to install the bundler which is basically a ruby gem.
gem install bundler
rbenv rehash
Now, run which ruby
in the terminal to check whether ruby has been installed or not. If ruby is successfully installed then, /home/{username}/.rbenv/shims/ruby
will be returned.
You might also like...
Fix garble in CSV when generating with ruby
Fixing zstd library not found issue when installing mysql gem on mac
Using specific node version in rails app.
Fix error in ruby. ruby is loading crypto in an unsafe way
Renaming tmux window
Ways of Managerial Communication
Types of Organizational Communication
Purpose of Business Communication
Need for communication
Importance of Communication
Definition of Communication
Characteristics and Benefits of Effective Communication
7 Cs of Effective Communication
Fixing mysql2 install error
Debugging Matplotlib
Ubuntu system program problem detected[Solved]
Serving Content through Cloudflare network
One liner server command in ruby
Free website using jekyll and free github hosting
How to install Jekyll ?
How to register for GithubEducation Pack ?