Setup script to get Ruby and Rails running on Ubuntu with one command using RailsReady
Posted by Bhushan Ahire | Posted in git, Rails, ruby, Subversion | Posted on 05-12-2011
0
How would you like to get a full Ruby on Rails stack up on Ubuntu with one command?
Now you can by running Rails Ready. Rails Ready is a setup script that gets Ruby and Rails running on a fresh install of Ubuntu with one command (Tested on Ubuntu server 10.04 LTS (Long-term Support)).
This is a brand new project by Josh Frye that he uses all the time to setup VMs, but there’s always testing to be done and improvements to be made.
Running the Script
Check out railsready.sh to see everything Rails Ready is doing.
sudo wget --no-check-certificate https://github.com/joshfng/railsready/raw/master/railsready.sh && bash railsready.sh
The script will then ask if you want to build Ruby from source or install RVM. If you want to watch the magic happen just run tail -f ~/railsready/install.log.
What gets installed?
- An updated system (Linux only)
- Homebrew (OSX only)
- Ruby 1.9.3 latest patch level (installed to /usr/local/bin/ruby) or RVM running 1.9.3 latest patch level
- Imagemagick
- libs needed to run Rails (sqlite, mysql, etc)
- Bundler, Passenger, and Rails gems
- Git
All you need to do is install NGINX or Apache, run passenger-install-nginx-module or passenger-install-apache-module, upload your app, point your vhost config to your apps public directory and go!
A note about RVM+passenger+nginx: Passenger installed via RVM can’t locate the OpenSSL package installed on Ubuntu. A user contributed fix is as follows:
rvm remove 1.9.2 rvm package install openssl rvm install 1.9.2 --with-openssl-dir=$HOME/.rvm/usr rvmsudo passenger-install-nginx-module
Hope this guide will be helpful to you.
