Skip to content

Category Archives: Uncategorized

Diving into Compass and SASS

Thanks for everyone who came out to my talk at Barcamp Tampa Bay today, and many thanks to all the organizers, volunteers, and sponsors. Here are the slides to my talk – Diving into Compass and SASS.  

Running migrations in Sinatra

Using Active Record in Sinatra and miss your rails db migration tasks? Create a /lib/tasks directory from your project root, and copy this file into it: In your Rakefile, add this line (thanks to this post): Dir.glob(‘lib/tasks/*.rake’).each { |r| import r } And, to let the migrations dump your schema.rb file: RAILS_ROOT = File.dirname(FILE) […]

Textmate trick for failing cucumber stories

Quick tip: if you’re trying to clean up some failing cucumber features, and you get output like so: cucumber features/my_feature.feature:24 # Scenario: My user does stuff cucumber features/my_feature.feature:38 # Scenario: My user does more stuff And you’d rather it look like this: bundle exec cucumber features/my_feature.feature:24 -f pretty bundle exec cucumber features/my_feature.feature:38 -f pretty So […]

quick tip: bunder, rails 2.3.8, and rspec

I set up an app on 2.3.8 with bundler, and when trying to run the rspec tests got …/config/Gemfile not found (Bundler::GemfileNotFound) which is odd. I’d grabbed the code for config/intializers/preinitializer.rb from; to solve the issue I changed line 15 from ENV["BUNDLE_GEMFILE"] = File.expand_path(“../../Gemfile”, _ FILE _) to ENV["BUNDLE_GEMFILE"] = File.expand_path(File.join(Rails.root,”Gemfile”), _ FILE _) […]

quick tip: zsh and bundler

I’m just starting to look at bundler — way ahead of the curve as usual. I’m using zsh, and every time I ran a bundle command I’d get: correct ‘bundle’ to .. [nyae]? To turn off the autocorrect message, just add this to your .zshrc: alias bundle=’nocorrect bundle’

migrating a rails app from 2.x to 3.0

I’m sitting here with @gavinstark at major coffee/sandwich chain playing with rails 3.0 for the railsbridge bugmash weekend. Here’s what I had to do to get the omnominator app migrated to 3.0. Some (most) steps taken from Yehuda Katz’s post. Check out rails source: git clone git:// Run rails update script I forked a copy […]

Setting up a new development environment on OSX

I recently set up a new MacBook Pro for development. Here’s what I did, mostly as notes to myself for next time: Basic rails environment I mostly followed Robby Russell’s guide, here. That got xcode, macports, ruby and rails, mongrel and postgres installed. MySql Most of my projects use MySql instead of postgres. I installed […]

running rake from cron

Quick tip, mostly for myself: I’m moving a site to a new server. I’ve got several cron jobs set up to do things like delete caches, rotate logs, backup the db, etc. Most of the code for those tasks is written as rake tasks, so it’s nice, readable ruby code and included in the code […]