Error in Migration

I am a RoR newbie. I am getting this error when trying to migrate my 2.x
project to 3.x project.
normalize_path': undefined methodto_sym’ for nil:NilClass

In that line i can see the following code

why $1.to_sym ends with NilClass error

On Fri, May 17, 2013 at 12:37 AM, Amarnath K.
[email protected]wrote:

You’re getting NoMethodError because $1 in $1.to_sym is nil and nil
have a #to_sym method.

$1 gets set whenever you #match a string against a regular expression
has at least one capture group. By the time your line of code gets
executed, you clearly haven’t done so.

Also, the question mark at the end of the line as you’ve show it:


Is invalid (type it into an IRB session after initializing a local
“options” to an empty hash and you’ll see that the parser things you’re
starting a ternary: “condition ? when-true : when-false” expression and
doesn’t consider the statement complete. Did you mean to have the “?”
the “+” inside the regular expression?

So, without more info on what you’re trying to get this line of code to
(what you expect $1 to be at this point, etc.) that’s all the help I can