I'm getting an error that I have no clue how to fix when trying to execute the ReadMe sample usage with my credentials subbed in. I'm running Rails v.3.2.12 and Ruby 1.9.3p392 on a Windows 7 PC. Here is the error I'm receiving:
SyntaxError in CheckoutController#ship_options
D:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/rexml/functions.rb:302: syntax error, unexpected '.', expecting ';' or '\n'
config.action_controller.perform_caching = falsefalse( )
^
D:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/rexml/functions.rb:395: syntax error, unexpected keyword_end, expecting $endRails.root: D:/webroot/lincoln_rails
This error occurred while loading the following files:
rexml/document
rexml/element
rexml/xpath
rexml/functions
I've tried with both UPS and FedEx with the same Syntax Error response (it bombs on the response = fedex.find_rates line). Here is my call from the controller:
# Package up a poster and a Wii for your nephew.
packages = [
Package.new(
100, # 100 grams
[93,10], # 93 cm long, 10 cm diameter
:cylinder => true), # cylinders have different volume calculations
Package.new(
(7.5 * 16), # 7.5 lbs, times 16 oz/lb.
[15, 10, 4.5], # 15x10x4.5 inches
:units => :imperial
) # not grams, not centimetres
]
origin = Location.new(
:country => 'US',
:state => 'CA',
:city => 'Beverly Hills',
:zip => '90210'
)
destination = Location.new(
:country => 'CA',
:province => 'ON',
:city => 'Ottawa',
:postal_code => 'K1P 1J1'
)
fedex = FedEx.new(:login => 'xxx', :password => 'xxx', :key => 'xxx', :account => 'xxx', :meter => 'xxx', :test => true)
response = fedex.find_rates(origin, destination, packages)