How to install Ruby and Rails on OS X using rbenv

I recently re-installed Ruby and Rails to start playing with it again. This time when I went to rubyonrails.org to check what was the latest version of Ruby and Rails, I noticed they were not recommending the traditional RVM to manage the Ruby installation anymore, but they were recommending something called rbenv. So I tried it.

Although rbenv has a lengthy documentation page on its GitHub page, the instructions to install Ruby and then Rails where not 100% complete and I had to look for extra information on Stack Overflow and other sites.

Here’s a step by step to install rbenv, Ruby and then Rails on OS X Yosemite.

  1. Install Homebrew, the package manager for OS X. Paste the following at a Terminal prompt:
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. Now that Homebrew is installed, run the following:
    $ brew update
    $ brew install rbenv ruby-build
  3. You can now list all the available Ruby version and check the one you want to install:
    $ rbenv install -l
  4. Let’s install Ruby version 2.2.2 (or whatever version you want):
    $ rbenv install 2.2.2
  5. If you check your Ruby version now ($ ruby -v) you will still see the existing system Ruby version and not the one you just installed. To fix that, run the following commands to make sure rbenv is in your PATH:
    $ export PATH="$HOME/.rbenv/bin:$PATH"
    $ eval "$(rbenv init -)"
    $ env | grep PATH
  6. Now that we have rbenv and Ruby installed, let’s install Rails:
    gem install rails
  7. Rails is now installed, but in order for us to use the rails executable, we need to tell rbenv to see it:
    rbenv rehash
  8. And now we can verify Rails is installed:
    rails -v

With that, you should be all set up with your new Ruby on Rails installation.

If you have any questions about any of the steps, just let me know!

Spitfire Pilot: The Book That Puts You Inside The Cockpit

I don’t know why I didn’t start reading this kind of books earlier. I loved this one.

Spitfire Pilot: A Personal Account of the Battle of Britain is a book written in 1940 by Flight Lieutenant David Crook DFC. It wasn’t written as a book but as his personal diary during the Battle of Britain in World War II and was then published as a book.

Continue reading Spitfire Pilot: The Book That Puts You Inside The Cockpit

3 Podcasts You Need To Listen To If You Are Into Startups, Entrepreneurship And Technology

After years of not being subscribed to any podcast, I started listening to them again.

Here are some of my favorites. It’s amazing that you can (still) find great content online for free!

Continue reading 3 Podcasts You Need To Listen To If You Are Into Startups, Entrepreneurship And Technology

ElectriFly Cosmic Wind

When I first saw this plane at the field I instantly wanted it. Its sleek fiber glass fuselage, practical size, high quality and incredible old school design make it must-have RC plane.

The ElectriFly Cosmic Wind is a very faithful replica of the 1947 monoplane designed specifically for The Goodyear Trophy, as part of the Formula One Air Racing.

Continue reading ElectriFly Cosmic Wind