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...

en.wikipedia.org

Cross-Origin Resource Sharing (CORS) is a browser technology specification, which defines ways for a web service to provide interfaces...

codeodor.com

Code example for implementing Cross-Origin Resource Sharing (CORS) in Rails.

makandra dev
web.archive.org

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...

makandra dev
failtale.be

Free Hoptoad/Airbrake alternative which can capture exceptions from any platform. It comes with a Rails notifier and a RESTful API...

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

VirtualBox does not offer anything for this task -- you need to do it yourself. It's not that hard:

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...

To test if you can connect to a host using password authentication and explicitly deny public key authentication:

Here is how to switch your Selenium to Chrome: Make sure you've got a recent version of chromedriver in...

If you want to have an English Ubuntu UI, but still see dates, money amounts, paper formats, etc. in German...

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

My RubyMine (and it seems like many other Java GUI applications) crashes the Compiz window decorator almost every time on...

richfrog.curzons.net

Get "PuTTY Link" and "Pageant" (an SSH key agent) from the PuTTY download page. Run pageant.exe, find its icon inside...

devnet.jetbrains.net

To activate the shell command, go to Tools > Create Command-line Launcher and confirm. Now you have mine as bash...