Thursday, May 13, 2010

Escape character \& Ampersand in ruby wget call fails

This is because ruby is not built to handle a bash escape with the ampersands in them. The correct way to solve this problem is by using the open-uri library supported by ruby.

An example is as shown here:
require 'open-uri'
open('http://www.mywebpage.com\&param=45')

0 comments:

Post a Comment