Code, Computers & Random Junk

Upgrading Ruby With MacPorts

I upgraded ruby today. From ruby 2.3.0p0 (my installation) to ruby 2.3.1p112. It’s one of the programs I hadn’t replaced with MacPorts yet. And this blog is based on ruby (rake, bundle etc)

I recently installed a newer version of vim and thought I should add the Ruby-intergration. It’s not hard to move/upgrade, but required some steps.

First - install the new version of ruby. That is ruby23 in MacPorts terms. And then select it:

sudo port upgrade ruby23
sudo port select --set ruby ruby23

Check the install:

which ruby && ruby -v

If it still shows the old version:

hash ruby && ruby -v

Now we need to re-install bundler:

sudo gem install bundler

Now, for the Octopress-blog. Re-install the dependencies, with:

cd /path/to/octopress
sudo bundle install

It will intall everything again against the new version (& location) of Ryby.

With that done - just fire it up and start blogging again…

rake preview        # in one window
rake new_post['New post title']

Happy hacking…