Hi Lindsay, What we determined from Luke's error is that you probably have the file RAILS_ROOT/app/controllers/application.rb, which shouldn't be there. Delete that file and see if it works.
Thanks, Matt Parrish http://www.pearware.org On Jun 21, 2007, at 5:05 AM, Lindsay Pallickal wrote: > Luke Wendling wrote: >> I'm attempting to use RadiantOnRails but when trying to boot, I get a >> NameError: no_login_required for Admin::WelcomeController on line >> 8 of >> radiant_extensions.rb. I added require statements to >> welcome_controller.rb and to application.rb in the radiant gem but no >> luck. Anyone else running into this? >> >> -Luke > > I'm getting the same error at the same place. I am using the gem and > have followed the instructions in the README. The server is running > under Kanotix, which is an offshoot of Debian. > > The no_login_required line in > gems/radiant-0.6.1/app/admin/welcome_controller.rb is unrecognized > (NameError). This happens when the activate method calls > RadiantOnRails::RadiantExtensions.init, which tries to modify > Admin::WelcomeController with a class_eval statement. > > I'm speculating that Admin::WelcomeController hasn't been loaded > yet at > this point, and this class_eval statement triggers its loading before > some dependency that is providing the no_login_required > functionality is > loaded. > > Any fix for this? I will try and implement my public facing > controller/view as an extension until I can work around this. I've > read > that adding no_login_required to the top of an extension's controller > allows one to use them publicly without being logged in to the admin > area. Haven't tried that yet though. > > -Lindsay > > Below is the trace - > > [EMAIL PROTECTED]:~/PCC5$ script/server -p 32000 > => Booting WEBrick... > /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/app/controllers/admin/ > welcome_controller.rb:2: > undefined local variable or method `no_login_required' for > Admin::WelcomeController:Class (NameError) > from > /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/ > activesupport/lib/active_support/dependencies.rb:203:in > `load_without_new_constant_marking' > from > /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/ > activesupport/lib/active_support/dependencies.rb:203:in > `load_file' > from > /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/ > activesupport/lib/active_support/dependencies.rb:342:in > `new_constants_in' > from > /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/ > activesupport/lib/active_support/dependencies.rb:202:in > `load_file' > from > /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/ > activesupport/lib/active_support/dependencies.rb:94:in > `require_or_load' > from > /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/ > activesupport/lib/active_support/dependencies.rb:248:in > `load_missing_constant' > from > /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/ > activesupport/lib/active_support/dependencies.rb:452:in > `const_missing' > from > /var/rails/PCC5/vendor/extensions/radiant_on_rails/lib/ > radiant_on_rails/radiant_extensions.rb:8:in > `init' > ... 25 levels... > from > /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/railties/lib/ > commands/server.rb:39 > from > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require' > from > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from script/server:3 > > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Radiant mailing list > Post: [email protected] > Search: http://radiantcms.org/mailing-list/search/ > Site: http://lists.radiantcms.org/mailman/listinfo/radiant _______________________________________________ Radiant mailing list Post: [email protected] Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
