Skip to content

Monthly Archives: December 2010

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 […]