2. Installing Dependencies for Ruby on Linux via Terminal
1) Open your terminal
2) Just copy below given code, paste it and you are done
sudo apt-get update
sudo apt-get install curl zlib1g-dev build-essential libssl-dev
libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev
libxslt1-dev libcurl4-openssl-dev python-software-properties
libffi-dev nodejs
Note: you can get codes from https://gorails.com/setup/ubuntu/16.04
3. Installing Ruby using rbenv on Linux via Terminal
1) Open your terminal
2) Just copy below given code, paste it and you are done
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
Note: you can get codes from https://gorails.com/setup/ubuntu/16.04
4. Installing Ruby using rbenv on Linux via Terminal
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
rbenv install 2.4.0
rbenv global 2.4.0
Note: you can get codes from https://gorails.com/setup/ubuntu/16.04
5. Installing Ruby using rvm on Linux via Terminal
1) Open your terminal
2) Just copy below given code, paste it and you are done
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
gpg --keyserver hkp://keys.gnupg.net --recv-keys
409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm install 2.4.0
rvm use 2.4.0 --default
Note: you can get codes from https://gorails.com/setup/ubuntu/16.04
6. Check whether Ruby has been installed on Linux via Terminal
1) Open your terminal
2) Type “ ruby -v “
3) You should get output of which ruby version has been installed
4) After ruby is installed you must install bundler as
gem install bundler
Note: you can get codes from https://gorails.com/setup/ubuntu/16.04
7. Installing Rails on Linux via Terminal
1) Open your terminal
2) Just copy below given code, paste it and you are done
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
gem install rails -v 5.0.1
3) To check if rails is installed type “ rails -v ”
4) You should get which rails version has been installed
Note: you can get codes from https://gorails.com/setup/ubuntu/16.04
8. Setting up MYSQL on Linux via Terminal
1) Open your terminal
2) Just copy below given code, paste it and you are done
sudo apt-get install mysql-server mysql-client libmysqlclient-dev
Note: you can get codes from https://gorails.com/setup/ubuntu/16.04
9. Configuring Git on Linux via Terminal
1) Open your terminal
2) Just copy below given code, paste it and you are done
git config --global color.ui true
git config --global user.name "YOUR NAME"
git config --global user.email "YOUR@EMAIL.com"
ssh-keygen -t rsa -b 4096 -C "YOUR@EMAIL.com"
Note: you can get codes from https://gorails.com/setup/ubuntu/16.04
10. Configuring Git on Linux via Terminal
3) Paste the key generated by following code to your Github ssh
key at your github account
cat ~/.ssh/id_rsa.pub
4) To check if git has been configured type following
ssh -T git@github.com
5) You should get output something like “ Hi your name You've
successfully authenticated, but GitHub does not provide shell access.“
Note: you can get codes from https://gorails.com/setup/ubuntu/16.04