The other day for some random reason it occurred to me to see what version of Ruby I'm running on my MacBook Pro. So I do a 'ruby -v' and find that I'm running 1.8.6. According to the Ruby on Rails download page, they recommend 1.8.7, which also happens to be the version my production host uses.
So I do a little digging around and find a page about upgrading Ruby. It looked like I could do it with MacPorts (which I already had installed) like so: 'sudo port install ruby rb-rubygems'. (I also did some other stuff for upgrading the macport system and all the installed ports, can't find the page now with the whole procedure.) Ruby installed, everything looked good.
Ran 'ruby -v' again. Still version 1.8.6. Huh? Do a 'port list | grep ruby', and yes it has 1.8.7--and not 1.8.6. Turns out 1.8.6 is the default version of Ruby that ships with Leopard, and it has priority in the path. Found a page with the fix, which is just a change to a few environment variables in ~/.bash_profile, including your path so the right version of Ruby runs, and some variables that allow you to share the same gems between ruby versions.
So far, so good: finally 'ruby -v' was giving me 1.8.7. Tried to run my app, and it crashed with some hpricot related 'bus error'. Found lots of posts from people having similar errors, but no solutions. So I gave up and went back to 1.8.6, because I have more important things to be doing than fighting with UNIX crap. That was a waste of an hour or two. :(
Sunday, December 14, 2008
Saturday, December 13, 2008
Get tab key to select form elements in Firefox on the Mac
Project Unblowuppable has some pages where there are intermixed text fields and dropdown (select) elements. In Firefox if you were in a text field and the next element was a dropdown, it would skip the dropdown and go to the next text field. Really annoying for entering data. It worked fine in Safari, and I was wondering if maybe there was some HTML option I had to specify for the select items.
Turns out it's actually a Mac system preference! Just change an option and everything works. Why Firefox has the problem and Safari doesn't, I don't know, but there you go.
Turns out it's actually a Mac system preference! Just change an option and everything works. Why Firefox has the problem and Safari doesn't, I don't know, but there you go.
Subscribe to:
Posts (Atom)

