Notice
- 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
Following tutorials are amazing.
2. Development Machine Setup
Windows
-
Install Ruby on Rails
-
Install Editor Sublime Text 3
Linux
Following instructions are taken from http://gorails.com/setup/ubuntu
-
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.
-
Open terminal in ubuntu and run the following commands, update package manager
sudo apt-get update
-
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
-
Go to home directory
cd
-
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
-
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
-
Install ruby
rbenv install 2.0.0-p247 rbenv global 2.0.0-p247 ruby -v
-
When gems are installed no need to install documentation.
echo "gem: --no-ri --no-rdoc" > ~/.gemrc
-
Create a github account if you don't have one.
-
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"
-
Show the generated ssh key
cat ~/.ssh/id_rsa.pub
-
Copy the printed ssh key and paste in to the following link
-
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
-
Install nodejs
sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs
-
Install rails
gem install rails
-
Rehash rbenv so it will pick up install rails
rbenv rehash
-
Verify rails its version should be 4.0.0+
rails -v
-
Create a new rails application
rails new myapp
-
Change directory to myapp
cd myapp
-
Create Database
rake db:create
-
Start the server
rails server
-
Verify Application works
-
Install Editor Sublime Text 3
3. Links
- https://www.facebook.com/groups/rubyfcc/
- http://en.wikipedia.org/wiki/Ruby_(programming_language)
- http://guides.rubyonrails.org/
- https://railscasts.com
4. Books
Ruby
- Learn Ruby the hard way
- Mr. Neighborly's Humble Little Ruby Book
- Programming Ruby
- Why's (Poignant) Guide to Ruby (mirror)
- The Bastards Book of Ruby