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

  • Home
  • SEARCH
  • 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 7491499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:03:56+00:00 2026-05-29T16:03:56+00:00

Having a weird issue with Rails 3.2.1. Working with a legacy database with icky

  • 0

Having a weird issue with Rails 3.2.1. Working with a legacy database with icky column names and I’m trying to clean them up in my model. The following model works fine in HTML, but responding with JSON or XML throws a stack level too deep error:

class Order < ActiveRecord::Base
    set_table_name 'ordersum'
    set_primary_key 'ordernbr'

    alias_attribute 'id','ordernbr'
    alias_attribute 'customer_id', 'custid'
    alias_attribute 'shipping_name', 'sname'
    alias_attribute 'shipping_company','scompany'
    alias_attribute 'shipping_address1','saddress1'
    alias_attribute 'shipping_address2','saddress2'
    alias_attribute 'shipping_city','scity'
    alias_attribute 'shipping_state','sstate'
    alias_attribute 'shipping_zip','zip'
    alias_attribute 'shipping_country','scountry'
    alias_attribute 'shipping_phone','sphone'
    alias_attribute 'shipping_method','shipvia'
    alias_attribute 'subtotal','product'
    alias_attribute 'shipping', 'freight'
    alias_attribute 'handling', 'handling'
    alias_attribute 'total', 'ordertot'
    alias_attribute 'transaction_id', 'vsTransactionId'
    alias_attribute 'reference_number', 'vsrefnbr'
    alias_attribute 'approval_code', 'vsappcode'
    alias_attribute 'created_on', 'entereddtm'
end

class OrdersController < ApplicationController
  respond_to :html, :xml, :json

  def index
    @orders = Order.all
    respond_with @orders
  end
end

Order is stack level too deep with no stack trace.

Edit #1 Framework/Full trace had 1 item:

actionpack (3.2.1) lib/action_dispatch/middleware/reloader.rb:70

Edit #2 Found some additional details after digging. Did a rails console and an Order.find and got the error below. Please note that Order.allworks fine.

C:\Users\Rich\App>rails console
Loading development environment (Rails 3.2.1)
irb(main):001:0> Order.find(1)
  ←[1m←[36mOrder Load (1.0ms)←[0m  ←[1mSELECT `ordersum`.* FROM `ordersum` WHERE `ordersum`.`ordernbr` = 1 LIMIT 1←[0m
SystemStackError: stack level too deep
        from C:/ruby/lib/ruby/1.9.1/logger.rb:443
irb(main):002:0>
  • 1 1 Answer
  • 0 Views
  • 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-29T16:03:57+00:00Added an answer on May 29, 2026 at 4:03 pm

    Did you mean to alias handling to itself?

    alias_attribute 'handling', 'handling'
    

    That’ll blow your stack right up.

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

Sidebar

Related Questions

I'm having a weird issue with a function I'm trying to call from within
I am having some weird issue here. I have a database table which has
I've been having this weird issue when trying to do a UI animation between
Good evening, I am having a weird issue with a method I am trying
I was having a weird issue with a very simple model. When posted back
I'm having a weird issue with Visual Studio 2008. Every time I fire it
I'm having a very weird issue in IE6. If I set a div container
I'm having a weird problem with the following function, which returns a string with
I'm having this weird issue and I'm hoping someone could clear this up for
I am having a weird issue with cookies in CodeIgniter. The problem is I

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.