As you may know, the latest version of Firefox has a JavaScript .pdf viewer. This can cause issues when you want to download a .pdf file.
To eliminate problems with the Firefox .pdf viewer in Watir, disable "pdfjs" in Firefox preferences, like so:
profile['pdfjs.disabled'] = true
Here it is in a complete Firefox profile set up for downloading, which you must create before instantiating the Watir browser:
download_directory = "your_download_path"
download_directory.gsub!("/", "\\") if Selenium::WebDriver::Platform.windows?
profile = Selenium::WebDriver::Firefox::Profile.new
profile['browser.download.dir'] = download_directory
profile['browser.download.folderList'] = 2
profile['browser.helperApps.neverAsk.saveToDisk'] = "application/pdf"
browser = Watir::Browser.new :ff, :profile => profile
I hope this saves some people a bit of research.