Friday 5 August 2016

Setup of Ruby On Rails

Hi,

This is my first blog so i am going to start with setup of ruby on rails.

We will be setting up a Ruby on Rails development environment on Ubuntu 15.10 Wily Werewolf.
The reason we're going to be using Ubuntu is because the majority of code you write will run on a Linux server. Ubuntu is one of the easiest Linux distributions to use with lots of documentation so it's a great one to start with.

1. The first step is to install some dependencies for Ruby.

sudo apt-get update
sudo apt-get install git-core 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

2. The installation for rvm is pretty simple:

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.3.1
rvm use 2.3.1 --default
ruby -v
 
3. The last step is to install Bundler 
 
gem install bundler 


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"
 
The next step is to take the newly generated SSH key and add it to your Github account
 
cat ~/.ssh/id_rsa.pub
 
Once you've done this, you can check and see if it worked:  
 
ssh -T git@github.com
 
You should get a message like this:   
  

Hi excid3! You've successfully authenticated, but GitHub does not provide shell access.
 
 
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodej
 
gem install rails
 
   

No comments:

Post a Comment