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...
Under the same origin policy, a web page served from server1.example.com cannot normally connect to or communicate with a server...
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
When you generate a URL in a mailer view, ActionMailer will raise an error unless you previously configured it which...
Thunderbird 5 brings a custom chrome on Windows Vista/7 that uses translucent Aero decorations on toolbars and menubars. Here is...
Here is how to switch your Selenium to Chrome: Make sure you've got a recent version of chromedriver in...
Sometimes, when running a rake task, RubyGems 1.8.5 raises an error: rake aborted! undefined method `specifications' for "/usr/lib/ruby/gems/1.8":String
When CoffeeScript was added to Rails 3.1 they forgot one very important part, the ability to use it when responding...
Get "PuTTY Link" and "Pageant" (an SSH key agent) from the PuTTY download page. Run pageant.exe, find its icon inside...
Because your examples should not change global state, you should not need to care about the order in which RSpec...
In order to request a SSL certificate from any dealer, you usually need a CSR certificate. As both the CSR...