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 Ess (NameError) #691

Closed
kalashnikovisme opened this issue Dec 26, 2013 · 2 comments
Closed

uninitialized constant Ess (NameError) #691

kalashnikovisme opened this issue Dec 26, 2013 · 2 comments

Comments

@kalashnikovisme
Copy link

I have model Esse.

rails g bootstrap:themed esses

and then

/home/pavel/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/inflector/methods.rb:230:in `block in constantize': uninitialized constant Ess (NameError)

what have I do?

@chip
Copy link

chip commented Jan 10, 2014

@kalashnikovisme - Using pry-debugger (https://github.com/nixme/pry-debugger), I was able to reproduce this on a local project using Mongoid and eventually got to this point in the code:

    87: def retrieve_columns
 => 88:   binding.pry
    89:   if defined?(ActiveRecord) == "constant" && ActiveRecord.class == Module
    90:     rescue_block ActiveRecord::StatementInvalid do
    91:       @model_name.constantize.columns
    92:     end
    93:   else
    94:     rescue_block do
    95:       @model_name.constantize.fields.map {|c| c[1] }
    96:     end
    97:   end
    98: end

You might be using something different like ActiveRecord, so I would recommend that you install pry-debugger and try stepping through the code. Posting a backtrace would help, and you should also post your Esse model here so that someone can review. Thanks.

@kalashnikovisme
Copy link
Author

@chip thanks!!

I've replaced Esse to Essay.

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

3 participants