Ken Koceja
2006-Oct-01 20:53 UTC
[Masterview-users] MasterView Admin Controller problem and more
I can''t get to the MasterView Admin Controller. I have enabled it by setting the |"enable_admin_pages"| configuration setting to true in the "C:\rails\config\masterview\settings.rb" file. When I go to URL "http://localhost:3000/masterview", I get the following error: Routing Error / Recognition failed for "/masterview" Also, running the MasterView generator for my Admin controller created all the expected html files alongside the existing rhtml files. It appears that Rails is only using the rhtml files as modifications to the html files are not reflected when the app is run. Did I generate the files incorrectly or am I misunderstanding how MasterView works? Any help would be appreciated. Thanks, Ken
Jeff Barczewski
2006-Oct-02 10:46 UTC
[Masterview-users] MasterView Admin Controller problem and more
On 10/1/06, Ken Koceja <krkoceja at wi.rr.com> wrote:> I can''t get to the MasterView Admin Controller. I have enabled it by > setting the |"enable_admin_pages"| configuration setting to true in the > "C:\rails\config\masterview\settings.rb" file. When I go to URL > "http://localhost:3000/masterview", I get the following error: Routing > Error / Recognition failed for "/masterview" > > Also, running the MasterView generator for my Admin controller created > all the expected html files alongside the existing rhtml files. It > appears that Rails is only using the rhtml files as modifications to the > html files are not reflected when the app is run. Did I generate the > files incorrectly or am I misunderstanding how MasterView works? >Ken, It sounds to me that somehow the admin controller is not getting loaded at startup as well as the automatic reparsing of the html feature and the loading of rhtml directly from masterview rather than writing to file system feature. Can you reply with a copy of the output that is given when you start your server? Hopefully the output will shed some light on what is happening. Here''s what I see when I start a copy on windows. C:\rails\demoa>ruby script\server => Booting WEBrick... INFO MasterView: Initializing MasterView configuration (2006-10-02 05:22) INFO MasterView: Program name = script/server INFO MasterView: MasterView Admin pages enabled INFO MasterView: Adding hook to allow MasterView to check for templates that ha ve changed when processing a request INFO MasterView: Adding hooks to enable Rails to read erb directly from MasterView INFO MasterView: MasterView plugin initialized - Version 0.2.5 => Rails application started on http://0.0.0.0:3000 => Ctrl-C to shutdown server; call with --help for options [2006-10-02 05:22:16] INFO WEBrick 1.3.1 [2006-10-02 05:22:16] INFO ruby 1.8.4 (2005-12-24) [i386-mswin32] [2006-10-02 05:22:16] INFO WEBrick::HTTPServer#start: pid=3688 port=3000 If you could also mention the steps you went through to get things up and running, maybe that will help. For instance indicate whether you installed via gem or plugin and what generate commands you used. Something like gem install masterview_gem_pack cd c:\rails rails demo cd demo ruby script\generate masterview_plugin ruby script\generate masterview Product Store ruby script\server Finally if you could give the output of these commands it might also help gem list rails gem list masterview Are you running rails 1.1.6, edge rails, or an older version? Thanks, Jeff
Jeff Barczewski
2006-Oct-04 14:12 UTC
[Masterview-users] MasterView Admin Controller problem and more
On 10/3/06, Ken Koceja <krkoceja at wi.rr.com> wrote:> I installed MasterView using gem and I''m using Rails 1.1.6. > > If I recall correctly, these were my steps. I created a Rails skeleton > application, created my DB and model, and then used the rails scaffold > generator for the model and admin controller. Finally, I executed the > MasterView generator for the model and controller. I believe I included > everything you asked for below. I''m new to both Rails and MasterView so > please excuse my ignorance. > > ====================================================> C:\rails\work\seniorcolony>ruby script\server > => Booting WEBrick... > => Rails application started on http://0.0.0.0:3000 > => Ctrl-C to shutdown server; call with --help for options > [2006-10-03 20:14:17] INFO WEBrick 1.3.1 > [2006-10-03 20:14:17] INFO ruby 1.8.2 (2004-12-25) [i386-mswin32] > [2006-10-03 20:14:18] INFO WEBrick::HTTPServer#start: pid=2924 port=3000 > ====================================================No problem Ken. My goal is to make this simple to use for anyone (rookies and veterans alike), so once we can figure out what is not working for you, we can update the documentation (or install) appropriately. Did you perhaps not run the generate plugin step? (Try doing this) cd yourwebapp ruby script\generate masterview_plugin You need to do this once for each new web application because it copies a minimal amount of things into the web app so that it gets loaded as a plugin. This is in addition to any masterview scaffolding you do (ruby script\generate masterview Product Store). It will copy some things into vendor/plugins/masterview If you don''t remember it''s fine to run it again, it won''t hurt anything. Let me know if after you do this if you have more output when you start your server and hopefully things start working :-) The only other thing we might and should probably do is to Thanks, Jeff