Error in Migration

6 views
Skip to first unread message

Amarnath Krishnan

unread,
May 17, 2013, 5:42:45 AM5/17/13
to rubyonra...@googlegroups.com
I am a RoR newbie. I am getting this error when trying to migrate my 2.x
project to 3.x project.

actionpack-3.2.13/lib/action_dispatch/routing/mapper.rb:109:in
`normalize_path': undefined method `to_sym' for nil:NilClass
(NoMethodError)

In that line i can see the following code
options[$1.to_sym]||=/.+/?

why $1.to_sym ends with NilClass error

--
Posted via http://www.ruby-forum.com/.

Colin Law

unread,
May 17, 2013, 6:42:34 AM5/17/13
to rubyonra...@googlegroups.com
On 17 May 2013 10:42, Amarnath Krishnan <li...@ruby-forum.com> wrote:
> I am a RoR newbie. I am getting this error when trying to migrate my 2.x
> project to 3.x project.
>
> actionpack-3.2.13/lib/action_dispatch/routing/mapper.rb:109:in
> `normalize_path': undefined method `to_sym' for nil:NilClass
> (NoMethodError)
>
> In that line i can see the following code
> options[$1.to_sym]||=/.+/?
>
> why $1.to_sym ends with NilClass error

That means that $1 is nil. Does the stack trace show which line of
your application code is causing the problem? What are you doing when
you get the error? Post the full stack trace if you can't see what
the problem is.

Did you google for how to upgrade an app to Rails 3, it is not the
easiest thing for a beginner to do?

Colin
Reply all
Reply to author
Forward
0 new messages