Luke W. 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?
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
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.
Below is the trace -
[email protected]:~/PCC5$ script/server -p 32000
=> Booting WEBrick…
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:inload_without_new_constant_marking’
load_file' from /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:342:innew_constants_in’
load_file' from /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:94:inrequire_or_load’
load_missing_constant' from /usr/lib/ruby/gems/1.8/gems/radiant-0.6.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:452:inconst_missing’
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:ingem_original_require’