cURL makes a web request and shows you the response body. You can redirect the response body to /dev/null just...
Consider you have a website vhost listening to www.example.com, redirecting all incoming requests that do not talk about the configured...
If your application raises an error like … Couldn't connect to the Solr server at http://127.0.0.1:8983/solr. 500 "Lock...
When you drag a file from a Nautilus window into a terminal window, the file's path will be pasted...
Whenever Firefox updates, all your Cucumber features that use Selenium break. This is annoying. In order to remedy this, version...
Selenium does not speak SSL because it uses WEBrick that doesn't. When you use Selenium for Cucumber scenarios that...
Ever wondered how Rails talks to itself in a Cucumber feature? In Rails 3 you can do it like this...
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...
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...
If you get the error "413 Request Entity Too Large" from Nginx client_max_body_size is too low (default...
Don't simply test for the presence of the magic Paperclip attribute, it will return a paperclip Attachment object and...
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:
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...
You cannot say this because url_for only takes one parameter: url_for(@deal, :tab => 'general') # won't work
We usually generate our commit messages from Pivotal Tracker IDs and titles, like [#15775609] Index view for conflicts