Setup Ruby with Ubuntu

setup Ruby on Ubuntu 12.04 LTS with rbenv - I installed Ubuntu to my old laptop (Windows 7) with - wubi. And I did

open terminal = ctrl + alt + T

(and then connect to Wi-Fi )

install git

$ sudo apt-get update
$ sudo apt-get install git

follow direction and install rbenv + ruby-build

$ git clone ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc
$ exec $SHELL 
$ type rbenv
"rbenv is a function"
$ git clone ~/.rbenv/plugins/ruby-build

install ruby - stable versions

$ rbenv install 1.9.3-p545
$ rbenv install 2.0.0-p451
$ rbenv install 2.1.1
$ rbenv versions
$ rbenv global 2.0.0-p451
$ rbenv version
$ ruby -v
$ rbenv rehash

However it said “The Ruby openssl extension was not compiled. Missing the OpenSSL lib?” So I did

( found it by search ) this first and install Ruby.

$ sudo apt-get -y install build-essential zlib1g-dev libreadline-dev libssl-dev libcurl4-openssl-dev libsqlite3-dev 

$ rbenv install 2.0.0-p451

And then…

Rails install was successful to me on 2.0.0.

install sqlite3

$ gem install sqlite3


$ gem install bundler


$ gem install rails --no-ri --no-rdoc

( forget --no-ri --no-rdoc part, and wait extra long time )

$ rails new testapp
$ cd testapp
$ rails server


Tried to open on localhost. This time it said “Could not find a JavaScript runtime” So I did

install node.js

$ sudo apt-get install nodejs
$ node -v

$ exec $SHELL
$ rails -v
Rails 4.1.0
$ rails server


Ruby on Rails!


text editor sublime_text

$ cd ~
$ wget\ Text\ 2.0.2.tar.bz2
$ tar vxjf Sublime\ Text\ 2.0.2.tar.bz2

(it depends by its version)

$ sudo mv Sublime\ Text\ 2 /opt/Sublime\ Text\ 2
$ sudo ln -s /opt/Sublime\ Text\ 2/sublime_text /usr/bin/subl
$ subl &


Now read this

HTTP, a stateless protocol

The Protocol Every Web Developer Must Know - Part 1 HTTP Made Really Easy These two links are what I read on. From requests, server make it responses. It’s a stateless, application-layer protocol for communicating between distributed... Continue →