# RadiantOnRails NameError for no\_login\_required

**URL:** <https://www.ruby-forum.com/t/radiantonrails-nameerror-for-no-login-required/106557>\
**Category:** Radiant CMS\
**Created:** [June 11, 2007, 9:58pm UTC](https://www.ruby-forum.com/t/radiantonrails-nameerror-for-no-login-required/106557 "2007-06-11T21:58:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![iluke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c6cbf5/32.png) [@iluke](https://www.ruby-forum.com/u/iluke)\
**Post date:** [June 11, 2007, 9:58pm UTC](https://www.ruby-forum.com/t/radiantonrails-nameerror-for-no-login-required/106557/1 "2007-06-11T21:58:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![iluke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c6cbf5/32.png) [@iluke](https://www.ruby-forum.com/u/iluke)\
**Post date:** [June 11, 2007, 10:09pm UTC](https://www.ruby-forum.com/t/radiantonrails-nameerror-for-no-login-required/106557/2 "2007-06-11T22:09:43Z")

</div>

I added include statements to radiant’s site\_controller and  
welcome\_controller and was at least able to boot up…

---

<div class="post-metadata">

**Author:** ![iluke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c6cbf5/32.png) [@iluke](https://www.ruby-forum.com/u/iluke)\
**Post date:** [June 12, 2007, 6:22am UTC](https://www.ruby-forum.com/t/radiantonrails-nameerror-for-no-login-required/106557/3 "2007-06-12T06:22:32Z")

</div>

Luke,

Are you running Radiant in “instance mode” and version 0.6.1? It  
looks like I didn’t document that very well, but you should  
initialize your project by running the following commands:

radiant /path/to/your/project  
cd /path/to/your/project  
svn export svn://rubyforge.org/var/svn/radiantonrails/trunk vendor/  
extensions/radiant\_on\_rails

Then you need to configure config/database.yml and follow the  
instructions in vendor/extensions/radiant\_on\_rails/README.

Try this out and let me know if your still having issues. I just did  
it and it is working for me.

Matt Parrish  
[http://www.pearware.org](http://www.pearware.org)

---

<div class="post-metadata">

**Author:** ![iluke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c6cbf5/32.png) [@iluke](https://www.ruby-forum.com/u/iluke)\
**Post date:** [June 12, 2007, 3:45pm UTC](https://www.ruby-forum.com/t/radiantonrails-nameerror-for-no-login-required/106557/4 "2007-06-12T15:45:16Z")

</div>

Matt,

Yes, I’m running instance mode with radiant 061 (I’m still unclear why  
radiant now has this “hybrid” set-up: somewhere between a plugin and a  
“normal” gem, but I’ll trust the team’s judgment on it). I followed  
your readme instructions and the radiant extension install  
instructions. So, I don’t know what I’m missing. I had to add the  
include statements to make the app boot up, but after that I still get  
other errors, for instance, when i try to navigate to /admin.

Can you send my\_app/config/environment.rb & my\_app/config/routes.rb  
files for a working install? Also, are there any changes that need to  
be made w/in the radiant gem itself to make this work?

Thanks,  
Luke

---

<div class="post-metadata">

**Author:** ![iluke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c6cbf5/32.png) [@iluke](https://www.ruby-forum.com/u/iluke)\
**Post date:** [June 21, 2007, 4:39pm UTC](https://www.ruby-forum.com/t/radiantonrails-nameerror-for-no-login-required/106557/5 "2007-06-21T16:39:36Z")

</div>

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](http://www.pearware.org)

---

<div class="post-metadata">

**Author:** ![iluke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c6cbf5/32.png) [@iluke](https://www.ruby-forum.com/u/iluke)\
**Post date:** [June 21, 2007, 9:01pm UTC](https://www.ruby-forum.com/t/radiantonrails-nameerror-for-no-login-required/106557/6 "2007-06-21T21:01:40Z")

</div>

Matt Parrish wrote:

> 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](http://www.pearware.org)

Ahh, this might be a common mistake. Because there is no generator for  
controllers in a Radiant project, I made a separate rails project just  
for generating and copied the app, test, and db folders to RADIANT\_ROOT  
afterwords. Since those folders didn’t exist in the Radiant project to  
begin with, I figured I wasn’t overwriting anything important.

Now to try and get ActiveScaffold working under RadiantOnRails, looks a  
bit hairy since it is a fairly complex plugin. I see a thread or two on  
getting plugins going though. Thanks for the tip.

-Lindsay

---

<div class="post-metadata">

**Author:** ![iluke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c6cbf5/32.png) [@iluke](https://www.ruby-forum.com/u/iluke)\
**Post date:** [June 21, 2007, 11:05am UTC](https://www.ruby-forum.com/t/radiantonrails-nameerror-for-no-login-required/106557/7 "2007-06-21T11:05:27Z")

</div>

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?
> 
> -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 -

railsuser@KanotixBox:~/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
