Brian Jenkins's blog
Interesting Things
The garbage collection bug we encountered on Monday has popped up in new places:
Rspec version < 1.1.11 + Linux ruby 1.8.6 patchlevel > 114 = (small explosion)
libxml version 0.5.4 (11 versions out of date) + Linux ruby 1.8.6 patchlevel > 114 = (another small explosion)
Also, speaking of libxml:
- ActsAsSolr was incompatible with more recent versions of libxml, but David has submitted a fix which has been incorporated into mattmatt's github fork.
Ask for Help
"Turning off cache-busting for test environment replaces cache-busting junk with ??. Is there a way to make it replace it with nothing instead?"
With cache busting on, you have would have to test like this:
admin_button.should have_tag("a > img[src ='/images/v3/admin/image_name.png?12121212?']")
which is awkward.
We turned it off by adding the following to config/environments/test.rb (google said to do it)
ENV['RAILS_ASSET_ID'] = ''
But, then we had to do this:
admin_button.should have_tag("a > img[src ='/images/v3/admin/image_name.png??']")
Is there a way to turn off cache-busting that doesn't put weird/ugly question marks at the end of your image names?
"with_tag & have_tag don't work in non-controller (e.g. model) rspecs?"
Yes, they don't. Use Hpricot instead. Or maybe assert_elements.
Ask for Help
"Does anyone know about recent changes to Ruby 1.8.6 garbage collection?"
We're seeing a strange test failure on one of our CI boxes:
[BUG] object allocation during garbage collection phase ruby 1.8.6 (2008-08-11) [i686-linux]
ruby -v gives this:
ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-linux]
On the developer's OSX machine, which doesn't experience this bug, ruby -v gives:
ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
There have apparently been changes to garbage collection in 1.8.7 and 1.9 -- does anyone know if these have been backported to 1.8.6 somewhere between patchlevels 114 and 287?
