Re: undefined method `first'' for :sessions:Symbol

Chris Hall
Tue, 29 Aug 2006 17:15:13 -0000

from the looks of it, you''ve got something going on inside your
routes.rb file that the generator doesn''t like...i would start there.

On 8/28/06, Fernando Meyer
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:
>
> when I try to greate a migration running,
>
> ruby script/generate migration mymirg
>
> I got this error,
>
>
c:/development/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:406:in
> `initialize_components'': undefined method `f
> irst'' for :sessions:Symbol (NoMethodError)
>         from
>
c:/development/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:340:in
> `initialize''
>         from
>
c:/development/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:616:in
> `connect''
>         from
>
c:/development/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:645:in
> `named_route''
>         from
>
c:/development/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:651:in
> `method_missing''
>         from ./script/../config/../config/routes.rb:4
>         from
>
c:/development/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/routing.rb:625:in
> `draw''
>         from ./script/../config/../config/routes.rb:1
>         from
>
c:/development/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in
> `load''
>          ... 7 levels...
>         from
>
c:/development/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/generate.rb:1
>         from
> c:/development/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `require''
>         from
>
c:/development/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
> `require''
>         from script/generate:3
>
> someone can help me ?
>
> Fmeyer
>
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>