Browsing all articles in Ruby on Rails

Overriding Rails’ automatic timestamps: updated_at & created_at

Posted Posted by Wes in Ruby on Rails     Comments No comments
Jul
5

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)

Posted Posted by Wes in Programming, Ruby on Rails     Comments No comments
May
10

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

Posted Posted by Wes in Kansas City Ruby User Group, Ruby, Ruby on Rails, Videos     Comments No comments
Mar
13

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

Posted Posted by Wes in Kansas City Ruby User Group, Ruby, Ruby on Rails, Videos     Comments 2 comments
Mar
12

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)

Posted Posted by Wes in Ruby, Ruby on Rails     Comments No comments
Mar
5

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

Posted Posted by Wes in Kansas City Ruby User Group, Ruby, Ruby on Rails, Videos     Comments No comments
Feb
12

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

Capistrano deploy error "fatal: unable to create '.git/index.lock': File exists"

Posted Posted by Wes in Ruby on Rails, Version Control     Comments No comments
Oct
21

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

Posted Posted by Wes in Ruby on Rails     Comments No comments
Aug
25

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

Posted Posted by Wes in Ruby on Rails     Comments No comments
Jun
10

I converted an application to haml and wanted to get rid of my previous ERb templates.
read more

blog Categories

about databasically

We live and work in Kansas City, USA.

We're passionate about helping small businesses succeed and want to help you use technology to get more done.

From server, desktop, network management to programming custom web applications in Ruby on Rails, we're here to lend a hand.

Contact us if you have any questions!