Rewind Ruby 1.9.1 (or “Put The Candle Back”)

I updated all the gems for my current Rails development project that is using Ruby 1.9.1. This also included an upgrade to Phusion Passenger 2.2.5. Then I upgraded to Ruby 1.9.1-p243, which promptly crashed Passenger when I did a session request through Authlogic 2.1.2. Ouch. So, I reinstalled Ruby 1.9.1-p129, and all is well again. Oddly enough, there is no uninstall switch in the Ruby-for-Linux tar ball Makefile. The default install location is /usr/local, so I can keep the Fedora 8 version of Ruby 1.8.6 (via the RPM package system) intact, but I wasn’t sure what would happen if I simply re-installed the older Ruby 1.9.1 version under /usr/local. As… Read More

Continue Reading

Changing IDEs

I have been bouncing between the RadRails and NetBeans IDEs for quite some time now. I like them both a lot, but I have not been able to make RadRails Test::Unit work 100% with Ruby 1.9.x. The 1.8.x version works fine, and I know there are some changes between the two Rubys that affect testing, but I have not done a complete analysis of the changes. In any event, I have switched to NetBeans 6.5.1 simply because I can run my Rails test suites with Ruby 1.9 and everything works. Of course the real solution is to get my professional and financial houses in order, acquire a MacBook Pro running… Read More

Continue Reading

Fun With Regular Expressions

If I wrote code all day, every day, I’m sure I could become really good at manipulating regular expressions. The obscure syntax is sort of Zen-like with a large dose of Perl obfuscation-fu. A one-liner that does a lot of cool text parsing appeals to the Nerd part of my DNA string. In reality, I have to grab my books when it’s regex time. The classic is Jeff Friedl’s “Mastering Regular Expressions”, published by O’Reilly, but this week I ran across a copy of O’Reilly’s “Regular Expressions Cookbook” by Goyvaerts and Levithan (Amazon link for both here), It covers 8 different languages, including Ruby. Worth a look. The Cookbook also… Read More

Continue Reading

Watir on Windows XP – Installation

Watir – Web Application Testing in Ruby – I’m thinking about adding this as part of my standard Rails integration tests. I like the idea of capturing keystokes that a user might actually run. Plus, it makes for a dandy demo tool. Here’s the summary of installation steps. I’m assuming you’re Rails-aware enough to have an application in place, and you know how to install Ruby gems: Rails Side – gem install watir gem install tg4rb Firefox Side – Install the TestGen4Web add-on Install the JSSH extension – start here to determine which version, and follow all the instructions on the page. Once you restart Firefox, the TestGen4Web icon should… Read More

Continue Reading

Ruby 1.9.1 (Entry 1)

I installed Ruby 1.9.1 from the Ruby site. I did the default “configure ; make ; make test ; make install” dance as root using gcc 4.1.2. This puts all the Ruby 1.9.1 files under /usr/local. The Ruby 1.8.6 version is a standard RPM for Fedora Core 8, and it’s all under /usr. I decided to switch between the two Ruby versions by constructing shell aliases to change the $PATH variable, as shown below. The syntax is the bash shell. [cwl@Fedorahost ~]$ alias old_ruby alias old_ruby=’export PATH=/usr/kerberos/bin:/usr/lib/ccache: \ /usr/bin:/usr/local/bin:/bin:/usr/bin:/usr/games:/home/cwl/bin’ [cwl@Fedorahost ~]$ old_ruby [cwl@Fedorahost ~]$ ruby -v ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-linux] [cwl@Fedorahost ~]$ gem env RubyGems Environment: – RUBYGEMS… Read More

Continue Reading