1. Update the source list

Assumed that ruby & gem are not installed. Need to install rvm first.

Before that, rvm require some packages which are not available on the default debian repo. Thus update the apt list first

Remember to switch to root user

1
$ su -

Edit the list file

1
$ vi /etc/apt/sources.list

Make sure all these are inside

1
2
3
4
5
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
deb http://http.kali.org/kali kali main non-free contrib
deb-src http://http.kali.org/kali kali main non-free contrib

Then run a command (to prevent GPG error)

1
2
$ gpg --keyserver pgpkeys.mit.edu --recv-key ED444FF07D8D0BF6
$ gpg -a --export ED444FF07D8D0BF6 | sudo apt-key add -

Then update the apt

1
$ apt-get update

2. Install necessary programs

First you need curl

1
$ apt-get install curl

3. Add yourself to sudoers

This is because later the rvm script will need sudo

1
2
$ adduser username sudo
$ exit // exit from root user

4. Install rvm

Make sure this is run by yourself (not root)

1
2
3
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$ \curl -sSL https://get.rvm.io | bash -s stable
$ source ~/.rvm/scripts/rvm

Install latest ruby

1
$ rvm install current

5. Rails app

1
2
$ rails new yourapp
$ cd yourapp

Execute it

1
$ bin/rails server

Now you can open up your browser, and type in localhost:3000

6. Test by other peers (optional)

Example if the project is run inside VM (I'm using VMWare Fusion), then

1
$ bin/rails server -b 192.168.1.xx

Later on, in your host OS's browser, type in 192.168.1.xx:3000

References: