When you don't know which options are available, but need to have an option selected, use this step.
Ever wondered how Rails talks to itself in a Cucumber feature? In Rails 3 you can do it like this...
I believe that when WEBrick has trouble bringing up your Rails application, the WEBrick component that is supposed to print...
If you have any class which requires access to some path methods generated by your routes. Even though you could...
Just add the parameter :post to the visit method: visit publish_entry_path, :post
Rails doesn't know which host it is running on. For generating links, it strips the hostname off the request...
When the Ruby parser module of Ruby-GetText comes across a file in one of its search directories (e.g. lib/scripts...
Date::Performance is a gem that replaces various method in Ruby's Date class with fast C implementations. Unfortunately it...
If you use Nginx with SSL and get an intermediate certificate with your certificate you have to do this:
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...
Don't simply test for the presence of the magic Paperclip attribute, it will return a paperclip Attachment object and...
When your Cucumber feature needs to browse the page HTML, and you are not sure how to express your query...
Cross-Origin Resource Sharing (CORS) is a browser technology specification, which defines ways for a web service to provide interfaces...
Code example for implementing Cross-Origin Resource Sharing (CORS) in Rails.
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
Resque comes with its own dashboard (Resque server) that you can mount inside your Rails 3 application with #config/routes.rb:
File.chmod(0604, '/path/to/file') # rw----r-- The leading zero is meaningful.
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...
Free Hoptoad/Airbrake alternative which can capture exceptions from any platform. It comes with a Rails notifier and a RESTful API...