Want to stay on top? Ruby Weekly is a once-weekly e-mail newsletter covering the latest Ruby and Rails news.
     Feed Icon

Rails Ready: Ruby and Rails on Ubuntu in One Line

By Peter Cooper / January 21, 2011

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)).

Adam Stacoviak

Rails Ready is essentially just a shell script but one you might find useful if you're running Ubuntu (or - update - CentOS) and want to get the installation process done and over as quickly as possible. It follows on rather nicely to our last post: Ruby Installer: Ruby and Rails on Windows in a Single, Easy Install!

If you have the time or you're installing this on your main development machine, however, I would recommend following Ryan Biggs' RVM based instructions (or my equivalent screencast) because RVM gives you more developer-level control later on (such as gem sets). UPDATE - Josh has been working hard and says that Rails Ready "now asks you if you want to build from source or install RVM" - nice!

Nonetheless, if you want to get a new Ubuntu (or CentOS) box running Rails as quickly as possible, Rails Ready is worth a try. The short version:

wget --no-check-certificate https://github.com/joshfng/railsready/raw/master/railsready.sh && bash railsready.sh

Before running the above, though, be aware of the ramifications. You should probably take a look at https://github.com/joshfng/railsready/raw/master/railsready.sh yourself to see if it's suitable for you.

Comments

  1. Josh Frye says:

    I have updated the script. It now asks you if you want to build from source or install RVM :)

  2. Peter Cooper says:

    I've updated the post - thanks!

  3. Tom says:

    I would love this for CentOS/RH!

  4. Josh Frye says:

    Care to do one more update? Had some contributions from the community and the "one liner" is much smaller now :)

  5. Peter Cooper says:

    I'm a bit rushed off my feet ATM to check it out again but if you can sum it up in a comment, I'll try and tweak it in.. :)

  6. Josh Frye says:

    Install with `wget --no-check-certificate https://github.com/joshfng/railsready/raw/master/railsready.sh && bash railsready.sh`

    Now supports Ubuntu 10.04 and CentOS 5.5 with more on the way. Implements distro detection and pulls down the correct "recipe" from the github repo to build your system.

    Thanks for the mention on the Ruby Show!

  7. Pingback: Installing Rails 3 in Ubuntu 10.04 | babinho's weblog

  8. jtucker says:

    Curious line in the script at line #20:
    railsready_path=$(cd && pwd)/railsready

    I didn't try on my machine but what gets me is the cd part first. I have my cd aliased to perform an ls after cd. I would guess that this behavior might break this script. Is the cd even necessary? I am very eager to try the script next time I need to perform an install! Thanks!

Other Posts to Enjoy

Twitter Mentions