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

Uninitialized constant when generating refinerycms_memberships #27

Open
frick156 opened this issue Oct 28, 2011 · 6 comments
Open

Uninitialized constant when generating refinerycms_memberships #27

frick156 opened this issue Oct 28, 2011 · 6 comments

Comments

@frick156
Copy link

Steps Taken:

  • Copied source into vendor/engines/refinerycms-memberships
  • Added "gem 'refinerycms-memberships', '1.0', :path => 'vendor/engines/'" to Gemfile
  • Ran "bundle install" successfully
  • Error occurred when attempting to execute "rails generate refinerycms-memberships"

Error:
/Users/frick156/Projects/lorug/vendor/engines/refinerycms_memberships/lib/refinerycms-memberships.rb:19:in block in <class:Engine>': uninitialized constant Refinery::Admin::DashboardController (NameError) from /Users/frick156/.rvm/gems/ruby-1.9.2-p180@refinery/gems/activesupport-3.0.10/lib/active_support/lazy_load_hooks.rb:34:incall'
from /Users/frick156/.rvm/gems/ruby-1.9.2-p180@refinery/gems/activesupport-3.0.10/lib/active_support/lazy_load_hooks.rb:34:in execute_hook' from /Users/frick156/.rvm/gems/ruby-1.9.2-p180@refinery/gems/activesupport-3.0.10/lib/active_support/lazy_load_hooks.rb:43:inblock in run_load_hooks'
from /Users/frick156/.rvm/gems/ruby-1.9.2-p180@refinery/gems/activesupport-3.0.10/lib/active_support/lazy_load_hooks.rb:42:in each' from /Users/frick156/.rvm/gems/ruby-1.9.2-p180@refinery/gems/activesupport-3.0.10/lib/active_support/lazy_load_hooks.rb:42:inrun_load_hooks'
from /Users/frick156/.rvm/gems/ruby-1.9.2-p180@refinery/gems/railties-3.0.10/lib/rails/application/finisher.rb:46:in block in <module:Finisher>' from /Users/frick156/.rvm/gems/ruby-1.9.2-p180@refinery/gems/railties-3.0.10/lib/rails/initializable.rb:25:ininstance_exec'
from /Users/frick156/.rvm/gems/ruby-1.9.2-p180@refinery/gems/railties-3.0.10/lib/rails/initializable.rb:25:in run' from /Users/frick156/.rvm/gems/ruby-1.9.2-p180@refinery/gems/railties-3.0.10/lib/rails/initializable.rb:50:inblock in run_initializers'
from /Users/frick156/.rvm/gems/ruby-1.9.2-p180@refinery/gems/railties-3.0.10/lib/rails/initializable.rb:49:in each' from /Users/frick156/.rvm/gems/ruby-1.9.2-p180@refinery/gems/railties-3.0.10/lib/rails/initializable.rb:49:inrun_initializers'
from /Users/frick156/.rvm/gems/ruby-1.9.2-p180@refinery/gems/railties-3.0.10/lib/rails/application.rb:134:in initialize!' from /Users/frick156/.rvm/gems/ruby-1.9.2-p180@refinery/gems/railties-3.0.10/lib/rails/application.rb:77:inmethod_missing'
from /Users/frick156/Projects/lorug/config/environment.rb:5:in <top (required)>' from /Users/frick156/.rvm/gems/ruby-1.9.2-p180@refinery/gems/railties-3.0.10/lib/rails/application.rb:103:inrequire_environment!'
from /Users/frick156/.rvm/gems/ruby-1.9.2-p180@refinery/gems/railties-3.0.10/lib/rails/commands.rb:16:in <top (required)>' from script/rails:6:inrequire'
from script/rails:6:in `

'

Environment information:
Ruby version: 1.9.2 p180
Rails version: 3.0.10

Notes:

  • Also attempted to clone code into project, as instructed in installation steps. Same error.
@rtacconi
Copy link

rtacconi commented Nov 2, 2011

I have the same issue, using

gem 'refinerycms', '~> 1.0.8'

@danielres
Copy link

same problem with refinery 1.0.9

@danielres
Copy link

problem disappeared, but I don't know how exactly

@shivanibhanwal
Copy link

Same problem - /vendor/engines/refinerycms_membership/lib/refinerycms-memberships.rb:19: uninitialized constant Refinery::Admin::DashboardController (NameError)
I am using
Rubyversion 1.8.7-352
Rails - 3.0.11
RefineryCMS - 1.0.9

@sharonov
Copy link

sharonov commented Jan 4, 2012

edit lib/refinerycms-memberships.rb
and remove "Refinery" from "Refinery::Admin::DashboardController"
to resulting " ::Admin::DashboardController".

the same with add_profile_fields_to_user.rb migration.

It worked for me. I've noticed this naming syntax in the other migrations.

@watkinshughes
Copy link

sharonov's comment fixed this for me. Be sure to update the add_profile_fields_to_user.rb migration as well.

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

6 participants