Archive for the ‘ruby on rails’ Category

Corrupt rspec_on_rails-1.0.8.tgz plugin

Thursday, December 13th, 2007

The past two releases of the rspec_on_rails plugin in tarball form have been corrupt, affecting 1.0.5 and 1.0.8. Unzipping using the OS X unzipper gives you the error message “Folder does not exist,” and using tar vxzf yields the following error:

[trimmed]
rspec_on_rails-1.0.8/tasks/
rspec_on_rails-1.0.8/tasks/rspec.rake
tar: Child returned status 2
tar: Error exit delayed from previous errors

RSpec on Rails requires the same revision as the RSpec plugin, so not having a working released version of the plugin pretty much makes the whole thing useless to Rails developers.
A reasonable workaround until the next release occurs is to navigate to your vendor/plugin directory and run the following command (for RSpec-1.0.8):

$ svn export --revision 2338 http://rspec.rubyforge.org/svn/trunk/rspec_on_rails

Rails Sessions

Saturday, July 28th, 2007

It’s been sort of a crazy week at work.

Make that two weeks.

My current project involves doing a lot of digging into the way Rails handles sessions, which it does through the CGI::Session object provided by the Ruby standard library. I to find a way to load a session by parameter instead of by cookie, which is infinitely more difficult than you’d think — although the class itself allows you to specify the ID of the session, I have yet to find the component inside Rails that instantiates the session and could thus be overloaded to provide this functionality. Eventually I found a neat hack, but afterwards I found a better solution to my original problem.

Then I slept for 15 hours.  Now it’s probably time to do a little font design.