In part it was due to the default install of ruby on OS X, me using Fink for package management and then later switching from that to MacPorts.
Apple (and I presumably) suck cvyrf.
The problem I ran into was that after installing ruby and rb-rubygem via the ports system, TextMate no longer seems too interested in compiling ruby scripts when I hit CMD-R and provides me with a lovely:
"No such file to load ” rubygemsChecking Google the first listing I get is this.
It did not provide me with an applicable solution but got me thinking ... Either I have some environment variables that are not being set (or set incorrectly) or my library paths are screwy somehow.
An easy way to confirm the former is to check if your shell environment also suffers from the same malady:
$ ruby -r rubygems -e "p 1"Not the problem then. Next step, let's pull out find and off a hunting we go:
$ sudo find / -name ruby -type fLet's see if there is some disparity between the ruby binary in /opt/local/bin and /usr/bin:
/opt/local/bin/ruby /opt/local/var/db/dports/software/ruby/1.8.6_0/opt/local/bin/ruby /usr/bin/ruby
$ /usr/bin/ruby -vWell, what do you know. The version in /usr/bin is older and also looks for its libs in a non /opt location which means that it won't pick up the good work port has done for me. I moved /usr/bin/ruby to /tmp and added a soft link for /opt/local/bin/ruby to /usr/bin.
ruby 1.8.2 (2004-12-25) [universal-darwin8.0]
$ /opt/local/bin/ruby -v
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.9.1]
Running my script in TextMate now works like a charm!
Thanks a million for the symbolic link tip. Now TextMate can find Gtk2 (and I can make a GUI window)!
Post a Comment