Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1069843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:28:49+00:00 2026-05-16T20:28:49+00:00

I have a Rails Model: ruby-1.9.2-p0 > NavItem => NavItem(id: integer, item_identifier: string, description:

  • 0

I have a Rails Model:

ruby-1.9.2-p0 > NavItem
 => NavItem(id: integer, item_identifier: string, description: string, description2: string, packing_unit: string, sales_unit_of_measure: string, ean_code: string, evp_price: string, item_category_code: string, class: string, product_group_code: string, maintenance_status: string) 

If I want to create a record:

ruby-1.9.2-p0 > NavItem.create
NoMethodError: undefined method `has_key?' for nil:NilClass
 from /Users/amueller/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/whiny_nil.rb:48:in `method_missing'
 from /Users/amueller/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.0/lib/active_record/attribute_methods/read.rb:69:in `class'
 from /Users/amueller/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.0/lib/active_record/persistence.rb:285:in `attributes_from_column_definition'
 from /Users/amueller/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.0/lib/active_record/locking/optimistic.rb:62:in `attributes_from_column_definition'
 from /Users/amueller/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.0/lib/active_record/base.rb:1396:in `initialize'
 from /Users/amueller/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.0/lib/active_record/base.rb:496:in `new'
 from /Users/amueller/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.0/lib/active_record/base.rb:496:in `create'
 from (irb):20
 from /Users/amueller/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/commands/console.rb:44:in `start'
 from /Users/amueller/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/commands/console.rb:8:in `start'
 from /Users/amueller/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/commands.rb:23:in `<top (required)>'
 from script/rails:6:in `require'
 from script/rails:6:in `<main>'

What can I do? I have other Models which works just fine. I dont know how to catch this error 🙁 Are there any reserved words in the columns or do Rails try to apply some configuration over convention magic on this?

I use Rails3 with Ruby 1.9.2.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T20:28:49+00:00Added an answer on May 16, 2026 at 8:28 pm

    You are using class (a reserved word) as one of your column names. If you change that, you should be fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Ruby on Rails model that has a column called expiration_date .
I'm using ruby 1.9.2 and rails 3.2.2. I have a 'domain' model (domain.rb): class
We're using Rails 3.2.3, Ruby 1.9.1, and HAML. We have a Post model and
I have a simple model setup in my Ruby on Rails app. (User {name,
I have a polymorphic association in a Ruby on Rails model. In the migration,
I have a Ruby on Rails model that has quite a few HABTM relationships.
Let's say I have a Ruby on Rails blogging application with a Post model.
I have a model List with an attribute called description of type string. Not
Ruby on Rails 3.2.2, Ruby 1.9.3 I have array data from Siz.requirements.all (model) model
I have a ruby (1.9.3) on rails (3.1) app where: app/models/list.rb class List <

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.