Overriding Rails’ automatic timestamps: updated_at & created_at
When converting something in a project, I found that I needed to updated a field for every record in a Request table. No problem, except this client grabs a SQL dump and run reports on it. So, Rails’ automatic timestamping of the updated_at field made all of the Requests look like they’d just been updated. Which they had, but not by users.
So, this rake task will reset all of them, presuming you have something to set them to. In my case, I found the latest comment date and used that, but you could figure it out some other way.
Jammit Warning: Asset compression disabled — Java unavailable (Mac/Apple)
I set up Jammit locally on my Mac running Leopard and was receiving this error:
Jammit Warning: Asset compression disabled -- Java unavailable
I checked out Java:
> java -version java version "1.5.0_22" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03-333-9M3125) Java HotSpot(TM) Client VM (build 1.5.0_22-147, mixed mode, sharing)
Odd. Poking into the jammit source, I saw that java 1.4 is required to use the YUI javascript compressor, but I had selected the google closure compiler which requires java 1.6, hence the [unclear] error message.
On Leopard, if you’ve run all your System Updates, you probably have java 1.6, but you have to select it as the default: Applications > Utilities > Java Preferences > drag new version to top
Kansas City Ruby Users: Luke Pillow on Jeweler
Luke Pillow present to the Kansas City Ruby Users Group on Jeweler and Gemcutter rubygems.org.
Also, Luke is helping to organize the Ruby Midwest conference, so you should check that out.
Kansas City Ruby Users Group | March 2010 | Luke Pillow | Jeweler for Rubygems | kcrug.org from Wes Garrison on Vimeo.
Kansas City Ruby Users: Ryan Smith on Heroku
Ryan Smith presents to the Kansas City Ruby Users Group on Heroku: why it’s wonderful for deploying Ruby on Rails applications, how to set up a new application and deploy it to Heroku in minutes, and how to use Heroku add-ons to support search.
Kansas City Ruby Users Group | March 2010 | Ryan Smith | Heroku | kcrug.org from Wes Garrison on Vimeo.
Installing sqlite headers on ubuntu (sqlite3.h not found)
I was setting up Integrity for the first time and ran into this on my server when bundling gems:
~$ bundle install ... Installing do_sqlite3 (0.10.0) from rubygems repository at http://gemcutter.org/ with native extensions /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:482:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) /usr/bin/ruby1.8 extconf.rb checking for sqlite3.h... no *** extconf.rb failed *** ...
The key is the line: checking for sqlite3.h... no
The do_sqlite3 gem gets compiled natively, but the development headers weren’t installed on the system and so the compilation won’t work.
Install them:
~$ sudo apt-get install sqlite3 ~$ sudo apt-get install libsqlite3-dev
Then, re-bundle:
~$ bundle install
Kansas City Ruby User Group: Kyle J Ginavan on Progressive Enhancement
Presentation: Kyle Ginivan on Progressive Enhancement
Progressive enhancement is a strategy for web design that emphasizes accessibility, semantic markup, and external stylesheet and scripting technologies. Progressive enhancement uses web technologies in a layered fashion that allows everyone to access the basic content and functionality of a web page, using any browser or Internet connection, while also providing those with better bandwidth or more advanced browser software an enhanced version of the page.
read more
Kansas City Ruby User Group: Shashank Date on Blocks, Procs, and Lambdas
Kansas City Ruby Users Group | February 2010 | Kyle J. Ginavan | Progressive Enhancement | kcrug.org from Wes Garrison on Vimeo.
Capistrano deploy error "fatal: unable to create '.git/index.lock': File exists"
This isn’t specific to capistrano, necessarily, but I ran into it deploying.
fatal: unable to create '.git/index.lock': File exists
read more
Announcing: Lowdown, a Cucumber feature editing webapp
An original application completed for Rails Rumble 2009.
Lowdown helps keep your development project on track by helping developers, designers, project managers and owners all focus on satisfying stakeholders.
Built along with Sean Cribbs + Scotty Moon + Paul du Coudray
While leading the competition after judges’ voting ended, we slipped to 4th place after public voting and ended up taking the “Best Appearance” category, which is fantastic.
Remove ERB files after upgrading to haml
I converted an application to haml and wanted to get rid of my previous ERb templates.
read more

Posted by Wes in
