When the Ruby parser module of Ruby-GetText comes across a file in one of its search directories (e.g. lib/scripts...
If you want to use the (badly implemented!) solarized color scheme in your Rubymine IDE: Clone the IntelliJ IDEA port...
If you use Amazon AWS cloud services you definitively want to utilize software raid for IO intensive stuff such as...
Date::Performance is a gem that replaces various method in Ruby's Date class with fast C implementations. Unfortunately it...
Attached is a working config to deploy an application with Capistrano that needs to monitor Resque workers with God.
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...
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...
When you need to use diff in either some Ruby code or your Rails app, use the differ gem.
I think this pattern is really useful not just for upgrading suites from Webrat, but really anywhere you have an...
When you need to zip up files in Ruby, use zipruby. sudo gem install zipruby You can add existing files...
To offer files for download, use send_file. def download(file) send_file file.path, :disposition => 'attachment' end
If you're writing a spec for an application using Resque, you may need to work off queues manually without...
Resque comes with its own dashboard (Resque server) that you can mount inside your Rails 3 application with #config/routes.rb:
Note: If you are currently working with Ruby 1.8.7 or 1.9.3, we recommend to upgrade to Ruby 2.1 first. From...
File.chmod(0604, '/path/to/file') # rw----r-- The leading zero is meaningful.
This note describes how to kick a user out of a Rails application after she hasn't requested an action...
When you create a temporary file (e.g. to store a generated Excel sheet) and try to send it to the...
In Rails 2, you could use link_to_remote...
...:update => 'id' to automatically replace the content of $('#id').
If you use Selenium and Launchy to open web pages, you might run into an error saying "Your Firefox profile...
Note that this card is very old. You might want to use ActiveType for your auto-coerced virtual attributes instead...
We usually generate our commit messages from Pivotal Tracker IDs and titles, like [#15775609] Index view for conflicts
Sometimes you need a file of some size (possibly for testing purposes). On Linux, you can use dd to create...