Jacob Maine's blog



Jacob MaineJacob Maine
Standup 7/31: Keep CI running smoothly
edit Posted by Jacob Maine on Friday July 31, 2009 at 09:21AM

Ask for Help

"Any really awesome scheduling tools out there?"

One project is looking for a nice GUI based scheduling tool that provides insight on and control over their jobs. They'd like to start and stop, reschedule, prioritize and monitor their queues and jobs. Why are all the solutions out there so enterprise-y ($$$)?

Interesting Things

  • Maybe we'll learn the third time around. Selenium + transactional fixtures = pain. Turn transactional fixtures off.

Jacob MaineJacob Maine
Standup 7/30/2009: Named Sporks
edit Posted by Jacob Maine on Thursday July 30, 2009 at 11:51AM

Ask for Help

"We have an EngineYard slice that handles port 443 requests. From that box, we want to connect to a port 443 service, but we get directed to port 8443 instead. Any suggestions?"

We're using the box's external IP, beause we want to go back through the load balancer, so using the internal IP doesn't work.

Interesting Things

  • The RubyConf CFP is out. Deadline is August 21st.
  • The named_scope changes we were struggling with have been rolled back. If you liked the behavior we were having trouble with, we submitted a patch to allow that functionality, so add your +1 to the lighthouse ticket.
  • If you are using Google hosted javascript libraries, but didn't like all the calls to google.load(...) in your code, you can now put them in the URL in the src attribute of your script tag. Though the documentation doesn't mention it, this works for all the libraries, including jQuery.
  • A number of issues with Spork, the rSpec server, and Desert, the Rails plugin framework, were unearthed. First, Spork requires that the string RAILS_GEM_VERSION appear in you environment file, even if it's commented out. It uses that to know you're running Rails. Second, because of the way Spork delays loading of ApplicationController and ApplicationHelper, any changes to them require a restart of the Spork server. And finally, because Spork and Desert both manipulate load paths, they can step on each other. Not sure if there's a good workaround for this problem.

Jacob MaineJacob Maine
Standup 7/29/2009 Latest Queuing Options
edit Posted by Jacob Maine on Wednesday July 29, 2009 at 06:24PM

Ask for Help

"In addition to Delayed::Job any recommendations for background queuing?"

A project needs to run a series of interconnected sequential jobs in the background, probably with just one worker.

Interesting Things

Jacob MaineJacob Maine
Standup 7/28/2009: Rails 2.3.3 Woes
edit Posted by Jacob Maine on Tuesday July 28, 2009 at 09:30AM

Interesting Things

  • A few people have had problems with a change to named scope in Rails 2.3.3. The gist of the change is that if you chain named scopes, one of which uses a lambda that executes queries with the same model class, those queries are evaluated with the scope built up by the chain, not the default scope of the model. with_exclusive_scope may get around this, but could lose the default scope (or break things like acts_as_paranoid).

  • Rails 2.3.3 + Passenger fails with certain system configurations. Rails 2.3.3 does not bundle Rack, although 2.3.2 did. This may also be the cause of Mongrel failures someone noticed with script/server.

Jacob MaineJacob Maine
Standup 7/27/2009: Testing Partial Locals
edit Posted by Jacob Maine on Monday July 27, 2009 at 09:05AM

Ask for Help

"What's the best way to test that a controller (a) renders a partial and (b) passes the partial the right locals?"

Mocking render_template and the locals ends up mocking too much of the request cycle. Ideally, we'd like something like:

response.should render_partial("item", :locals => {:item => assigns[:item]})

"Hpricot breaks with xml elements named param. Any suggestions?"

Works if we replace Hpricot with Nokogiri, so that may be the way to go.

Interesting Things

  • A follow up on the problems using Fixture Scenarios with Rails 2.3.2: The fixture are loading twice, although it's not clear why. The second run barfs with a syntax error. Perhaps the first run doesn't properly close the fixture file?
  • Raising the timeout fixed issues with S3 uploads over slow connections. It might also be more efficient. The timeout could stop a 90% complete upload, then kick off a retry (the gem has a 3 retry policy), which further clogs the tubes.