Or, if you want to live on the edge and try the latest:
gem install rails --pre
Or with RVM
RVM is a command line tool which allows us to easily install, manage and work with multiple ruby environments from interpreters to sets of gems. See installation instructions and a full tutorial on that.
My new app is called myapp.example.com
rails new myapp.example.com
Have a look around and see what you can find .
Thin will be the Ruby server
gem install thin
/usr/sbin/update-rc.d -f thin defaults
thin config -C /etc/thin/myapp.example.com -c /var/www/myapp.example.com --servers 3 -e development # or: -e production for caching, etc
If you don’t like Thin..
aptitude install mongrel mongrel-cluster
mongrel_rails cluster::configure -e development -p 3000 -N 3 -c /var/www/myapp.example.com -a 127.0.0.1 # or: -e production for caching, etc
sudo ln -nfs /var/www/myapp.example.com/config/mongrel_cluster.yml /etc/mongrel_cluster/myapp.example.com.yml
#sudo ln -nfs /var/www/myapp.example.com/config/mongrel_cluster.yml /etc/mongrel-cluster/sites-enabled/myapp.example.com.yml
Nginx will be the Web server, proxing ruby requests to thin, running on ports 3000-3002 If you haven’t installed it yet, do
aptitude install nginx
Now that you have Nginx, create a vhost. Edit /etc/nginx/sites-available/myapp.example.com and type: