When adding a new field to your model's database table, don't set any defaults in the database.

web.archive.org

Single step and slow motion for Cucumber scenarios can come in handy, especially in @javascript scenarios. # features/support/examiners.rb AfterStep('@slow_motion...

If Rails or Rake are complaining about a missing gem that is listed in your Gemfile.lock and the listed version...

gitready.com

Sometimes you may need to figure out what branches exist on a remote repository so you can pull them down...

github.com

ExecJS lets you run JavaScript code from Ruby. It automatically picks the best runtime available to evaluate your JavaScript program...

makandra dev

We forked craken today and fixed one of the issues we had with new (>0.8.7) rake versions. The craken:install...

mislav.uniqpath.com

Random list of useful git commands for advanced users. I found some of them useful.

The state_machine gem comes with a rake task that lets you generate PNG graphs from any model using state...

Whenever Firefox updates, all your Cucumber features that use Selenium break. This is annoying. In order to remedy this, version...

github.com

Microsoft provides virtual machine disk images to facilitate website testing in multiple versions of IE, regardless of the host operating...

stackoverflow.com

These methods are available to you: page.driver.browser.switch_to.alert.accept page.driver.browser.switch_to.alert.dismiss page.driver.browser.switch_to.alert.text # the confirmation text Spreewald gives you steps like these:

github.com

Grit gives you object oriented read/write access to Git repositories via Ruby.

This is a bug in Timecop 0.3.4 or lower. You should upgrade to 0.3.5.

After updating Rubygems you see a wall of deprecation warnings like this: NOTE: Gem::SourceIndex#add_spec is deprecated, use...

makandra dev

When browsing a repository, pressing "t" allows you to quickly search for file names. Very awesome! Go here to try...

I recently browsed through the ActiveSupport code and found some nice stuff I did not know about: ActiveSupport::Callbacks

If you want to use the (badly implemented!) solarized color scheme in your Rubymine IDE: Clone the IntelliJ IDEA port...

Attached is a working config to deploy an application with Capistrano that needs to monitor Resque workers with God.

The Capybara API is somewhat hard for parse for a list of methods you can call on a Capybara node...

tl;dr: Always have your attachment path start with :rails_root/storage/#{Rails.env}#{ENV['RAILS_TEST_NUMBER']}/. The directory where you...

When your Cucumber feature needs to browse the page HTML, and you are not sure how to express your query...

When you need to create a locale for a language variant (like Austrian for German), you probably don't want...

github.com

When you need to use diff in either some Ruby code or your Rails app, use the differ gem.

If you're writing a spec for an application using Resque, you may need to work off queues manually without...