Tue, 22 Aug 06

Textmate environment and ruby (again)

I’ve recently upgraded the version of ruby on my machine and came up against problems similar to this. The problem previously was that textmate wasn’t finding ruby at all. This time, textmate was finding the wrong version of ruby.

I found the following script useful in determining exactly which ruby binary textmate was using.

#!/usr/bin/env ruby

require 'rbconfig'
puts Config::CONFIG['bindir']

Simply paste that into a textmate document, select it and hit Ctrl-r. The path of the ruby binary should print right there in the window.

To see far more info than you’ll ever likely need, replace the line starting puts above, with the following..

Config::CONFIG.sort.each do |key, value|
  puts "#{key} = #{value}"