tig path_to_file_or_files_or_path_with_wildcard

When using state_machine you sometimes need to know whether an object may execute a certain transition. Let's take...

After starting the Rails server in a freshly generated Rails 3.1 project you could see an error message such as...

Clearance is a gem that provides authentication functionality (e.g. login, logout). This note explains, how the clearance login, logout and...

By default, Rails views escape HTML in any strings you insert. If you want to insert HTML verbatim, you need...

danhixon.github.com

If you encounter the error message above when running cucumber, just execute... rm rerun.txt ...in the Rails directory.

linux.die.net

You can convert git commits into patch files. Those can be used to apply to a different repository [1] or...

Please note that you can break your system with this! This is not recommended. Sometimes the package repository has errors...

The most common use case for Ruby's #collect is to call a method on each list element and collect...

github.com

Looks simpler than inaction_mailer: gem install mailcatcher mailcatcher Setup Rails to send mails to 127.0.0.1:1025. Usually you want...

stackoverflow.com

Using git rebase can be painful but luckily you can resort to cheating with git reset and committing anew.

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.