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.
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
This is now part of geordi. Please don't follow the instructions below, if you use geordi. Inspired by the...
Note: While the solution in this card should still work, we prefer another solution now: Hide your Selenium browser window...
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.
If you use Selenium and Launchy to open web pages, you might run into an error saying "Your Firefox profile...
We usually generate our commit messages from Pivotal Tracker IDs and titles, like [#15775609] Index view for conflicts
API breakage ahoy. You need to either upgrade your Capybara or downgrade your selenium-webdriver gem. Alternatively, this could solve...
Sometimes you need a file of some size (possibly for testing purposes). On Linux, you can use dd to create...
We are changing our name from Hoptoad to Airbrake. You see, some folks much larger than us reached out and...
With gem dependency it is possible to check the dependencies for your gem before you install it.
Regular expressions can have something called "zero-width look-behind assertions". This means that you want a pattern to be...
Install Ruby from the Ubuntu repository: sudo apt-get install ruby ruby-dev \ ruby is the meta package. If you...
We're adding a script console-for to open a remote Rails console with one command. Also have a look...
sudo apt-get install sqlite3 libsqlite3-dev sudo gem install sqlite3-ruby
Ever wondered if there is a reverse for Rails' .each(&:to_s) idiom? Turns out there is... You probably already...
This is somewhat similar to the touch command of Linux: FileUtils.touch 'example.txt', :mtime => Time.now - 2.hours If you omit the :mtime...
If you encounter above mentioned failiure message after installing the ruby-debug gem then you have to explicitly require linecache...
Most web applications contain several examples of state machines, including accounts and subscriptions, invoices, orders, blog posts, and many more...
Yesterday, there was a blog post entitled “What the Hell is Happening to Rails” that stayed at the number one...