Wasim Akram

Blog

View on GitHub

Notice

  1. Info about Google Hangout session for 31st October is available at https://www.facebook.com/groups/rubyfcc/

Ruby on Rails Workshop

Table of Contents

  1. Ruby Tutorials
  2. Development Machine Setup
  3. Links
  4. Books

1. Ruby Tutorials

Following tutorials are amazing.

2. Development Machine Setup

Windows

  1. Install Ruby on Rails

    RailsInstaller

  2. Install Editor Sublime Text 3

    http://www.sublimetext.com/3

Linux

Following instructions are taken from http://gorails.com/setup/ubuntu

  1. Install Ubuntu 13.04 (64-bit if your machine is 64-bit) Ask friends who have already install ubuntu. Before installing another operating system do backup your data to external hard drive incase you loose anything.

    http://www.ubuntu.com/download/desktop

    Following are two Dual Boot tutorials I found.

    Windows 7 with Ubuntu 13.04

    Windows 8 with Ubuntu 13.04

  2. Open terminal in ubuntu and run the following commands, update package manager

    sudo apt-get update
    
  3. Install libraries

    sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev \
    libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev
    
  4. Go to home directory

    cd
    
  5. Install rbenv

    git clone git://github.com/sstephenson/rbenv.git .rbenv
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
    echo 'eval "$(rbenv init -)"' >> ~/.bashrc
    exec $SHELL
    
  6. Install ruby-build

    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
    
  7. Install ruby

    rbenv install 2.0.0-p247
    rbenv global 2.0.0-p247
    ruby -v
    
  8. When gems are installed no need to install documentation.

    echo "gem: --no-ri --no-rdoc" > ~/.gemrc
    
  9. Create a github account if you don't have one.

    https://github.com

    https://help.github.com

  10. Setup git/github, use your account info

    git config --global color.ui true
    git config --global user.name "Wasim Akram"
    git config --global user.email "xxxxxxxx@gmail.com"
    ssh-keygen -t rsa -C "xxxxxxxx@gmail.com"
    
  11. Show the generated ssh key

    cat ~/.ssh/id_rsa.pub
    
  12. Copy the printed ssh key and paste in to the following link

    https://github.com/settings/ssh

  13. Verify Github you should see response similar to "Hi excid3! You've successfully authenticated, but GitHub does not provide shell access."

    ssh -T git@github.com
    
  14. Install nodejs

    sudo add-apt-repository ppa:chris-lea/node.js
    sudo apt-get update
    sudo apt-get install nodejs
    
  15. Install rails

    gem install rails
    
  16. Rehash rbenv so it will pick up install rails

    rbenv rehash
    
  17. Verify rails its version should be 4.0.0+

    rails -v
    
  18. Create a new rails application

    rails new myapp
    
  19. Change directory to myapp

    cd myapp
    
  20. Create Database

    rake db:create
    
  21. Start the server

    rails server
    
  22. Verify Application works

    http://localhost:3000

  23. Install Editor Sublime Text 3

    http://www.sublimetext.com/3

3. Links

4. Books

Ruby

Ruby on Rails