Installing Ruby on Rails on Ubuntu 16.04 LTS

Tutorial Title: Installing Ruby on Rails on Ubuntu 16.04 LTS

Course: Web Engineering

Instructor: Muhammad Samim

Note: Copy and paste commands in terminal after dollar sign ($)


1. Selecting best server for updating OS
  • Search "Software & Update" and Open
  • .Click on mentioned drop down button and click on others
  • Find Japan in list and click on small mentioned icon
  • Click on "ubuntutym.u-toyama.ac.jp"
  • Click on "Choose Server"
  • Type your computer password and Click on "Authenticate"
  • Search "Software Updater" and open it.
  •  
  • Click on "Install Now"
  • You OS will be updated


2. Installing dependencies for Ruby Note: Type or copy and paste commands after $
  • Search "Terminal" and open or press Ctrl + Alt + t
  • $ sudo apt-get update
  • $ sudo apt-get upgrade
  • $ sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev
  • $ sudo apt-get install sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
3. Installing rbenv Note: Type or copy and paste commands after $
  • $ cd
  • $ git clone git://github.com/sstephenson/rbenv.git .rbenv
  • $ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
  • $ echo 'eval "$(rbenv init -)"' >> ~/.bashrc
  • $ exec $SHELL
4. Building Ruby Note: Type or copy and paste commands after $
  • $ git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
  • $ echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
  • $ exec $SHELL 
5. Installing Ruby Note: Type or copy and paste commands after $
  • $ rbenv install 2.3.1
  • $ rbenv global 2.3.1
  • $ ruby -v
 6. Installing Bundler Note: Type or copy and paste commands after $
  • $ echo "gem: --no-ri --no-rdoc" > ~/.gemrc
  • $ gem install bundler
7.  Configuring Git, Bitbucket/Github and Heroku

7.  Installing Rails Note: Type or copy and paste commands after $
  • $ sudo apt-get install -y nodejs
  • $ gem install rails -v 4.2.6
  • $ rbenv rehash
  • $ rails -v
8. Confirming successful installation of Ruby and Rails Note: Type or copy and paste commands after $
  • for ruby type $ ruby -v
  • for rails type $ rails -v
9. Installing and configuring PostgesSQL Note: Type or copy and paste commands after $
  • $ sudo apt-get install postgresql-common
  • $ sudo apt-get install postgresql-9.5 libpq-dev
  • apt-get -y install postgresql postgresql-contrib libpq-dev
10. Creating user name with your current user name of computer Note: Type or copy and paste commands after $
  • $ sudo -u postgres createuser yourname -s
11. Creating password for created user Note: Type or copy and paste commands after $
  • $ sudo -u postgres psql
  • \password
  • yourpassword


12. Installing MySQL (Its Choice to use it or postgreSQL, Not recommended) Note: Type or copy and paste commands after $$
  • $ sudo apt-get install mysql-server mysql-client libmysqlclient-dev
SHARE

Muhammad Samim

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment