Rail_upgrade gem fails to recognise environment.rb

The rails 3 upgrade gem is refusing to generate a new application rb for
project i am trying to get onto rails 3.

Running: rake rails:upgrade:configuration --trace
Results in the following error:

There doesn’t seem to be a real environment.rb in your app. Are you
config/environment.rb has the right contents?

Seems like the regex used to determine the environment.rb file is valid
failing to match the content in the file, please see the attached, it
pretty normal to me. What am I missing, for now will just make an
application.rb manually.