MustModify Blog: Recent Posts

get Ruby 1.9 Date.parse to assume American date format

March 29, 2011
Ruby 1.9 assumes that everyone has been broken of the bad habit of illogical date formats. in the console: --- >> Date.parse('2/15/2011') ArgumentError: invalid date >> Date.parse('2/15/11') ArgumentError: invalid date >> '2/15/2011'.to_date ArgumentError: invalid date --- While I'm driving everyone crazy by...


My Rails App Just Answered the Phone?

March 17, 2011
"Twilio":http://www.twilio.com/ apparently offers a "telephone api":http://www.twilio.com/how-twilio-works and also an SMS API. I get how you could easily set up an SMS API. Pretty cool stuff. But what amazed me what the idea that someone could call a telephone number, which would result in a post to my website... and I would respond with...


Cucumber via Envjs says "a.ownerDocument is null"

March 10, 2011
I recently received the following errors when running capybara with envjs. Strangely, there was a kind of double stack trace. Here are the exeptions: === WARNIING: {ENVJS} Exception while dispatching events: a.ownerDocument is null a.ownerDocument is null (Johnson::Error) === === WARNIING: {ENVJS} Exception while...


Ask Cucumber with Capybara for inline HTML... now with CSS Selectors!

January 18, 2011
Two very useful cucumber steps: --- Then 'display the page' do puts "\n\n\n#{page.body.to_s}\n\n\n" end Then /^display "(*)"$/ do |selector| puts "\n\n\n#{find(selector).native.to_html}\n\n\n" end --- When you're remoting in to your dev machine, you can't use "Then show me the page" because there is no desktop in which to open...


Bundler: NOT WORTH THE EFFORT

October 28, 2010
I've been exposed to bundler on a couple of projects recently. My impression is that it does a poor job of solving a rare problem, while making common tasks more difficult.


HTML5 canvas notes

October 03, 2010
Spinner (in german... Chrome translates) "post":http://nickynubbel.blogspot.com/2010/06/coole-iphone-kompatible-loading.html "example":http://dev.ubbel.de/html/loading/svg_background_shadow.html "Ajaxian: Canvas Loader":http://ajaxian.com/archives/canvas-loading-indicator-for-the-iphone-and-beyond "Apple's...


[fix for] interpolation syntax in I18n messages is deprecated

September 30, 2010
Somehow, Rails3 was installed in my 1.8 rvm gemset. rails3 depends on i18n v >= 0.4. Uninstalling i18n (and rails3, since it doesn't run in 1.8 anyway) corrected this issue.


Rails says, "Missing pdf-writer" when pdf-writer is unpacked in vendor/gems

September 01, 2010
Issue: *"Missing these required gems: pdf-writer = 1.1.8"* config/environment.rb: ---ruby config.gem "pdf-writer", :lib => "pdf/writer", :version => '1.1.8' --- That looks write... what's the issue? Turns out my new server didn't have the required dependencies. I added this above the config/gem line: --- ruby require...