tagged bugfix

by mars on 2009-07-28 0 Comments

LoadErrors raised from Ruby on Rails' ActiveSupport may look something like:

/usr/local/lib/ruby/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:426:in `load_missing_constant':
Expected /path/to/the/rails/root/app/models/bacon.rb to define Bacon (LoadError)
        from /usr/local/lib/ruby/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:80:in `const_missing'
        from /usr/local/lib/ruby/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:92:in `const_missing'
        from /usr/local/lib/ruby/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:437:in `load_missing_constant'
        from /usr/local/lib/ruby/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:80:in `const_missing'
        from /usr/local/lib/ruby/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:437:in `load_missing_constant'
        from /usr/local/lib/ruby/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:80:in `const_missing'
        from /usr/local/lib/ruby/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:437:in `load_missing_constant'
        from /usr/local/lib/ruby/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:80:in `const_missing'
         ... 26 levels...
        from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `load_modules'
        from /usr/local/lib/ruby/1.8/irb/init.rb:21:in `setup'
        from /usr/local/lib/ruby/1.8/irb.rb:54:in `start'
        from /usr/local/bin/irb:13

The folded/clipped/omitted middle of the stack trace leads to a very frustrating debugging experience.

Read the rest of this entry

by mars on 2009-01-10 0 Comments

I recently tried to do a Subversion copy from a remote repository into my local working copy, but I got a segmentation fault, like this:

% svn cp http://xxxxx.xxxxx.com/xxxxx/xxxxx/xxxxx
Segmentation fault

It leaves behind an unversioned .tmp copy of the file being copied, & svn cleanup must be run to release the lock. (I'm using OS X 10.5.6 Leopard [Darwin]).

Here's the info for my local working copy...

Read the rest of this entry

by mars on 2008-03-03 0 Comments

If you're trying to use a Sierra AirCard 597E on OS X 10.5 Leopard via the bundled Sierra Wireless Watcher Lite software, then you're probably frustrated like me.

Since my original review, Sierra did release a new version 1.1.3 of the beleaguered PowerPC binary (no it's not Universal/Intel-native). While the new version starts less slowly than 1.1.1, it still mysteriously crashes, sometimes taking the connection with it.

The fix? Simply use Apple's built-in modem dialer, leaving Watcher Lite dormant unless its device provisioning or activation functions are required.

Step 1: In the Network Preferences Panel, check "Show modem status in menu bar"

Step 2: Enjoy the nicely integrated, crash-free EV-DO connectivity

by admin on 2007-07-29 3 Comments

Just switched this site/blog from Typo to Mephisto, a process that's taken months to accomplish in spare moments of personal web productivity.

The conversion process didn't work so well at first. It took digging in to the Mephisto Converter code to make it work going from Typo 4.1.1 to Mephisto trunk.

Here's the code that made it WFM.

Read the rest of this entry

by mars on 2007-07-05 5 Comments

Well this is quickly becoming Mars' notes from building software on OS X blog!

Anyway, after following the official RMagick install, gem install rmagick fails with an error like:

/usr/local/lib/ruby/gems/1.8/gems/rmagick-1.15.7/./lib/rvg/misc.rb:321:
in `get_type_metrics': unable to read font `/Library/Fonts/Verdana' (Magick::ImageMagickError)

It seems that the examples fail because of a spurious font choice in the documented examples.

All that is needed to build the RMagick gem successfully at this point is:

sudo gem install rmagick -- --disable-htmldoc

And voila, the examples aren't built, thereby avoiding the problem.

RMagick!

by mars on 2007-06-05 0 Comments

Say for instance you just applied a software update to your Mac OS X Server and rebooted.

Suddenly a Rails app that was running fine spits out an error when ActionPack does a redirect_to. In the Rails production.log:

SystemStackError (stack level too deep)

Well my friend, before you set off to debugging the Ruby install on your OS X machine, try clearing the Rails sessions. At the command line:

rake tmp:sessions:clear RAILS_ENV=production

Everyone must login again, but alas the problem is solved! [for me]

Is it because we're using Apple's built-in Apache 1.3 web server with source-compiled FastCGI support? Hmmm.

by mars on 2006-07-16 4 Comments

Mogrify is ImageMagick's command-line utility to transform images. I'm using it within MiniMagick, a Rails plugin that allows image manipulation with minimum memory usage compared to the more ruby-like RMagick bindings.

So the point of this post... Do you get errors like "mogrify: unable to open module file" when it's looking for a coder?

Read the rest of this entry


Everything is here.