Before upgrading to 0.14.1 I had been using the Login generator, which puts login_system.rb in the lib directory. Since upgrading I get the following error when I go to a controller which uses the login_required filter: undefined method `login_required'' for #<Controllers::Controlcenter::DashboardController:0x380a688> Does this have something to do with a change in the load path? I attempted to add the following to my environment.rb file with no luck: config.load_paths += %W( #{RAILS_ROOT}/lib ) Any ideas? Thanks in advance. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Scott F. Walterscottwalter.com --explorer what''s new
Just a guess, but did your upgrade overwrite controllers/application.rb? I ask because that''s where people tend to put the require for login_system.rb (and the include too). Regards, Trevor On 24-Oct-05, at 12:14 PM, Scott Walter wrote:> Before upgrading to 0.14.1 I had been using the Login > generator, which puts login_system.rb in the lib > directory. Since upgrading I get the following error > when I go to a controller which uses the > login_required filter: > > undefined method `login_required'' for > #<Controllers::Controlcenter::DashboardController:0x380a688> > > Does this have something to do with a change in the > load path? I attempted to add the following to my > environment.rb file with no luck: > > config.load_paths += %W( #{RAILS_ROOT}/lib ) > > Any ideas? Thanks in advance. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Scott F. Walterscottwalter.com > --explorer what''s new > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
That was it! I thought I checked all files that Rails modified during the upgrade, I guess not. Hopefully the next upgrade will be less destructful :) scott. --- Trevor Squires <trevor-k8q5a0yEZAgS+FvcfC7Uqw@public.gmane.org> wrote:> Just a guess, but did your upgrade overwrite > controllers/application.rb? > > I ask because that''s where people tend to put the > require for > login_system.rb (and the include too). > > Regards, > Trevor > > On 24-Oct-05, at 12:14 PM, Scott Walter wrote: > > > Before upgrading to 0.14.1 I had been using the > Login > > generator, which puts login_system.rb in the lib > > directory. Since upgrading I get the following > error > > when I go to a controller which uses the > > login_required filter: > > > > undefined method `login_required'' for > > >#<Controllers::Controlcenter::DashboardController:0x380a688>> > > > Does this have something to do with a change in > the > > load path? I attempted to add the following to my > > environment.rb file with no luck: > > > > config.load_paths += %W( #{RAILS_ROOT}/lib ) > > > > Any ideas? Thanks in advance. > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Scott F. > Walterscottwalter.com > > --explorer what''s new > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Scott F. Walterscottwalter.com --explorer what''s new