Forum: Radiant CMS Weird Extension stuff on Deployment

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
78cb50691f1df8fd06c2cf26c524e598?d=identicon&s=25 Michael Jones (Guest)
on 2007-02-17 01:50
(Received via mailing list)
I developed a Radiant app with extensions, works great on my local box.

I deployed to TextDrive and now I'm having an issue.

* Login fine
* admin/pages shows fine
* First time hitting my extensions link the page renders fine
* Second time hitting my extensions like BAM!
Application error

This is the stack trace:

NameError (uninitialized constant Admin::EventsController):
    /vendor/rails/railties/lib/dispatcher.rb:40:in `dispatch'
    /vendor/rails/railties/lib/fcgi_handler.rb:168:in `process_request'
    /vendor/rails/railties/lib/fcgi_handler.rb:55:in `process!'
    /vendor/rails/railties/lib/fcgi_handler.rb:25:in `process!'

So the first time it loads my extension fine but the second time it
can't find it?

I do have rails in vendor/rails.


Dc893f8ae12045dc71048a0c6a56fc01?d=identicon&s=25 Jacob Burkhart (igotimac)
on 2007-02-17 04:57
First, make sure that your App is in production mode in environment.rb.

If that doesn't solve everything, then you can force things to work with
explicit "load" calls:



Try putting an explicit load call to your events controller at the end
of your extension definition. (or at the end of some other controller in
radiant core).

Yes I know this is a hack, but it's quick and dirty...
78cb50691f1df8fd06c2cf26c524e598?d=identicon&s=25 Michael Jones (Guest)
on 2007-02-18 23:48
(Received via mailing list)
Thanks for the suggestions Jacob.

The way I solved this was by editing my xxx_extension.rb file in the
routes section:

old: map.connect 'admin/tools/:action', :controller => 'admin/tools'
new: map.connect 'admin/tools/:action', :controller => 'tools'

Weird, works fine on my local box but in production mode on textdrive
I have to run it this way.

If someone has ideas of why this is the case I'd love to hear it.

8802b1fa1b53e2197beea9454244f847?d=identicon&s=25 Sean Cribbs (Guest)
on 2007-02-19 17:52
(Received via mailing list)

Although I see why it was done initially, I personally have issues
with namespaced controllers.  You probably failed to put the
controller inside the Admin module, or put it in the wrong directory,
which happens all the time. For the most part, it's just easier to
change the route and keep the controller in the root namespace.

This topic is locked and can not be replied to.