It's been a while

 I don't put the effort into this that I thought I would.  Regardless, I thought I would just say "out loud" that I think Elix...

January 12, 2014

Setting up the Ruby environment

So, I want to take a stab at building an app with Ruby on Rails.  Before I start, I want to make sure I can reproduce it on a different machine.  The first step to doing that is to control the version of Ruby I'm using.

I found this guide to get started.  Luckily, I was already familiar with Perl's plenv setup, so this all looked very similar.

Although plenv wants you to run your shell as a login shell and modify .profile, rbenv doesn't seem to work that way.  I needed to follow the instructions exactly, and only modify the .bashrc, and then change my shell to NOT be a login shell.

Install rbenv

I used this guide: rbenv

Install ruby-build

This is used to provide rbenv the ability to install new versions of Ruby.  I used this guide: ruby-build

Install Ruby

I chose to install the latest: rbenv install 2.1.0

However, this produce an error:

The Ruby openssl extension was not compiled. Missing the OpenSSL lib?

So, first you need to install libssl-dev

sudo apt-get install libssl-dev

Set the default version to Ruby 2.1.0

ruby env global 2.1.0

Ok, so now that this is all complete, I can now be confident about what Ruby version I'm working with.

Next up is bundler to manage the versions of gems I want to use.

No comments:

Post a Comment