moneyspyder/GA-Ruby-Expanded-Mobile-Tracking — Issue #1: Undefined method `+' for nil:NilClass when remote_address is blank
Author: bmorrall
Created: 2011-12-04 21:24:34+00:00
State: open

When I copied a ga link from my website, and then used curl to view the returned header info, I received a 500 exception:

NoMethodError (undefined method `+' for nil:NilClass):
app/controllers/ga_controller.rb:45:in `get_ip'
app/controllers/ga_controller.rb:136:in `track_pageview'
app/controllers/ga_controller.rb:17:in `utm_gif'
/path/to/app/bundle/ruby/1.9.1/bin/unicorn:19:in `load'
/path/to/app/bundle/ruby/1.9.1/bin/unicorn:19:in `

'

It appears that value remote_address.to_s returns null on my Ubuntu 10.04 machine while using ruby-1.9.2p290.