Saturday 15 February 2014

ruby on rails 3 - admin namespace access error - uninitialized constant Model_name -


I am working on the administrator namespace, pick some stuff like a user, post the resources in the admin section.

I have in config / routes.rb:

  Namespaces: Administrators do the following: to = & gt; 'Page # Home' #Mitch '"/" = & gt; "Page # Home" ,: Like: & gt; "Index" ,: By: = & gt; : Get the resource: Users, at the end of posts   

App / Controllers / Admin / Page_ Controller I have in Rbb:

  Category admin: Page Controller & lt; Admin :: ApplicationController def home @title = 'Home' and End   

Below is the error: (The complete error log is here :)

  & gt; & Gt; Listening to 0.0.0.0:3000, CTRL + C [pd: 28961] 2013-06-20 15: 50: 04.492 [INFO] (PID: 28 9 61) to stop the 2013-06-20 to 15: 50: 04.488 2013 -06-20 15: 50: 04.496 [INFO] Get "/ admin" for 127.0.0.1 initially 2013-06-20 15:50:04 -0500 (PID: 28961) 2013-06-20 15: 50: 05.149 [INFO] Processing by Admin: PageSource: # Home as HTML (PID: 28961) 2013-06-20 15: 50: 05.166 [DEBUG] User Load (2.6 ms) Select "User ". * "User" from "user". "Id" = 1 serial 1 (pid: 28961) 2013-06-20 15: 50: 05.534 [error] Initial continuous page / usr / local / rvm / james / rub -2.0.0- P195 / gm / na -s3-0.6.3 / lib / aws / s3 / extensions.rb: 212: In 'const_missing_from_s3_library'   

Do you have Any idea, why is that? What should I do?

Thanks a lot!

You should keep your administrator

ap / admin / page_transfer Rb

but

do not file for app / controller / admin / page_controller .rb

and Looks at the same concern - The default view should be kept for index actions in this controller:

App / View / Admin / Page / Index.html.erb

Your log on ps pastebin is different from what you've posted: 2013-06-20 15: 50: 04.488 [INFO] (PID: 28961) 2013-06-20 15:50: 04.492 [INFO] (PID: 28961) 2013-06-20 15: 50: 04.496 [INFO] Get "/ admin" for 127.0.0.1 2013-06-20 15:50:04 -0500 (PID: 28961) 2013-06-20 15: 50: 05.149 [INFO] Admin Processing by: PageSonverter # Home as HTML (PID: 28961) 2013-06-20 15: 50: 05.166 [debug] User load (2.6 ms) Select "user" user "WHERE" user "from" . "" Id "= 1 LIMIT 1 (pid: 28961) 2013-06-20 15: 50: 05.534 [Error] Initial continuous page

No comments:

Post a Comment