Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu is not missing constant SectionsMenu error #9

Open
TylerRick opened this issue Mar 4, 2010 · 2 comments
Open

Menu is not missing constant SectionsMenu error #9

TylerRick opened this issue Mar 4, 2010 · 2 comments

Comments

@TylerRick
Copy link

I got this error when i tried to go to http://localhost:3002/admin/sites/1:

ActionView::TemplateError (Menu is not missing constant SectionsMenu!) on line #16 of vendor/plugins/adva_cms/app/views/layouts/admin.html.erb:
13:     <%= yield :head %>
14: 
15: 
16:     <%= @menu.build(self).root.render(:id => 'top') %>
17:     <%= render :partial => 'admin/shared/header' %>
18:     
19: <%= yield :form if @content_for_form %>

config/initializers/menus.rb:

        menu :left, :class => 'main' do
          item :sites, :action => :index, :resource => :site if Site.multi_sites_enabled
          if @site && [email protected]_record?
            item :overview,      :action => :show,  :resource => @site
            item :sections,      :action => :index, :resource => [@site, :section], :type => Menu::SectionsMenu, :populate => lambda { @site.sections }
            item :comments,      :action => :index, :resource => [@site, :comment]           if Rails.plugin?(:adva_comments)
            item :newsletters,   :action => :index, :resource => [@site, "Adva::Newsletter"] if Rails.plugin?(:adva_newsletter)
            item :assets,        :action => :index, :resource => [@site, :asset]             if Rails.plugin?(:adva_assets)
          end
        end

This is when I use the tip commit from your master branch plus my Ruby 1.9 fixes (since I refuse to use ancient 1.8 and it didn't seem to make sense to ask you to pull from a fork of tag/0.3.0):

> ./script/about 
About your application's environment
Ruby version              1.9.1 (x86_64-linux)
RubyGems version          1.3.5
Rack version              1.0
Rails version             2.3.5
Active Record version     2.3.5
Active Resource version   2.3.5
Action Mailer version     2.3.5
Active Support version    2.3.5
Application root          /home/tyler/Web_sites/cms/adva
Environment               development
Database adapter          sqlite3
Database schema version   20090720132900

d398435 2010-03-03 20:07:00 -0800 Tyler Rick - Ruby 1.9 compatibility fix: In Ruby 1.9, we can no longer do require 'sha1' and SHA1.sha1 is renamed to Digest::SHA1.hexdigest.
73fb747 2010-03-03 20:05:28 -0800 Tyler Rick - Ruby 1.9 compatibility fix: Added "encoding: utf-8" to avoid getting this error:
96f07d8 2010-03-03 19:59:12 -0800 Tyler Rick - Ruby 1.9 compatibility fix: When called from vendor/plugins/routing-filter/lib/routing_filter/pagination.rb, this proc is expected to have 2 args. Changing it from lambda to proc causes Ruby
a0e8515 2010-03-02 15:51:18 +0100 Clemens Kofler - add missing indexes for page caching tables
8783f41 2010-03-01 17:14:30 +0100 Clemens Kofler - try to prevent race conditions for cached pages/references

Anyone know a solution? Is this related to https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2283-unnecessary-exception-raised-in-asdependenciesload_missing_constant ?

@TylerRick
Copy link
Author

By the way, it seems to be an issue when I use tag/0.3.0 too. I don't understand why...

@DwainBlazej
Copy link

I'm using Ruby 1.9.1 and am also stumped by this bug. Because of this bug, I'm going to have to give up on trying to use adva-cms, at least for now. I tested using the Rails 2.3.6 development branch with the 0002-backport-compute-type-fix.diff patch mentioned in
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2283-unnecessary-exception-raised-in-asdependenciesload_missing_constant
with little success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants