Reloadable mocked-out classes
test/mocks/development that requires the object you’re mocking, it won’t be reloaded each request like you’d expect in the development environment. That’s because you’re using require instead of load. Try instead:
load "#{RAILS_ROOT}/app/helpers/application_helper.rb"require_or_load.
Asprin for Lighttpd+fcgi: Use spawner
I’m late to the spawner party but finally made the move after lots of trouble with static fcgi processes. Jamis blogged about the difference between the two. My problem was that lightty couldn’t find the socket and would fill my error log (and hard drive!) telling me so. Fortunately, when this happened only my Rails app went down; the static sites stayed up.
I feared this spinner/spawner/reaper stuff, but fortunately in Rails 1.1 it’s as simple as:
./script/process/spawner -i 2 -r 10 (I only wanted two instances and wanted spawner to repeat spawn attempts every 10 seconds)
fastcgi.server = ( ".fcgi" =>
( "localhost-8000" => ( "host" => "127.0.0.1", "port" => 8000 ) ),
( "localhost-8001" => ( "host" => "127.0.0.1", "port" => 8001 ) )
)Best of all, my rc.d script works once again!
rjb + jt400.jar : success!
Yesterday I successfully connected to our AS/400 from Ruby by following Darren Day’s instructions over at Mission Data.
Key differences I found when setting it up on OS X:- You do have to set JAVA_HOME before installing rjb (set it to
/Library/Java/Home) - I had to
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JAVA_HOME/jre/lib/i386:$JAVA_HOME/jre/lib/i386/client.
I didn’t need to set the JavaVM.framework/Libraries symlink. - test.rb didn’t fail test_underscored_constant
- Obvious, but I missed it the first time when cutting & pasting: refer to the right path when doing your Rjb::load. Either way it returns nil.
HigherEd BlogCon
Last month’s HigherEd BlogCon was a success and had lots of good presentations. I felt fortunate to be among them. I only wish I had had enough time to watch each one as they came out. I’m still playing catch-up.
