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...

Given the problem you have a new column postion and that column should be updated for all existing rows with...

Generally for nested forms, a blank form is placed below all other existing object forms. If you would like to...

When you require the Ruby debugger to be available from your Rails console (e.g. you want to inspect a method...

stackoverflow.com

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

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...

makandra dev

Never use raise_error without specifying the Error you expect. expect { do_a_lot_of_complicated_stuff }.to raise_error...

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

When you run rake db:create and get this error message Couldn't create database for {"encoding"=>"utf8", "username"=>"root...

whatsmydns.net

whatsmydns.net is an online service that allows you to instantly perform a DNS lookup to check a hostnames current IP...

Consider you have a website vhost listening to www.example.com, redirecting all incoming requests that do not talk about the configured...

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

Observed on Rails 2.3 and machinist 1.0.6 Like the title says, when you define the method empty? like in the...

Ever wondered how Rails talks to itself in a Cucumber feature? In Rails 3 you can do it like this...

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

Sometimes the Rails helper #distance_of_time_in_words is using too much magic. When you need a time difference...

We have a big flat screen TV (Samsung LE46c650l1kxxu) in our conference room. Configuring it properly, we were encountering some...

Hint: There's another card with this helper for Cucumber features. Sometimes you feel like you need to stub some...

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

en.wikipedia.org

Cross-Origin Resource Sharing (CORS) is a browser technology specification, which defines ways for a web service to provide interfaces...

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

Note: While the solution in this card should still work, we prefer another solution now: Hide your Selenium browser window...

Ubuntu comes with keyboard layouts like "Germany Eliminate Dead Keys", which are practical for programming. If you need to type...

This finally works: User.any_instance.should_receive(...) as does User.any_instance.stub(...) Note: You won't have RSpec 2.6 if you're still working...