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 685029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:52:51+00:00 2026-05-14T01:52:51+00:00

I am completely stumped at the nature of this problem. We export data from

  • 0

I am completely stumped at the nature of this problem.

We export data from our application into a ‘cleaned’ YAML file (stripping out IDs, created_at etc). Then we (will) allow users to import these files back into the application – it is the import that is completely bugging me out.

In development, YAML::load_file(params[:uploaded_data].local_path) returns an array of YAML::Objects’s (and it doesn’t matter which of the number of different ways the file could be loaded):

[#<YAML::Object:0x3c63984 @class="Event", @ivars={"attributes"=>{"exception_count"=>"0", "title"=>"Start", "amount"=>"70.00", "colour"=>nil, "repeat_type_id"=>"0", "repeat_interval"=>"1"}}>, etc etc]

Which is very nice, as the attributes also include the (associated model) exceptions that you see an exception_count for.

However on production (rails 2.3.2, running REE 1.8.7 and 1.8.6 for testing, tested on two different production env’s, and running production locally) it returns an array of the Objects within the YAML – in this case, Event:

[#<Event title: "Start", amount: #<BigDecimal:3af2640,'0.7E2',4(8)>, repeat_type_id: 0, colour: nil,  repeat_interval: 1, exception_count: 0>, etc etc]

Now this would be just perplexing if it also included the associated model Exception with it – however it doesn’t.

Can anyone at all shed some light on why the Yaml parser would behave so differently between production and development?

I’m on rails 2.3.2, running REE 1.8.7; however I’ve also tested running Ruby 1.8.6 with exactly the same results.

Thanks for any help!

  • 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-14T01:52:51+00:00Added an answer on May 14, 2026 at 1:52 am

    I think this may be caused by cache_classes being set to true in production and in development false. The YAML::load_file method would try to find classes pertaining to these objects and because they haven’t been loaded yet will just create them as YAML objects.

    Try “loading” the Event class first simply by calling Event and see if that fixes it.

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

Sidebar

Related Questions

EDIT: I completely reworked this question to reflect my better understanding of the problem
On our site we are using an embedded sign-up form from our ESP that
I've decided to completely rewrite my old PHP project from the ground up. Before,
Here is my transcript from trying to merge my bugfix branch onto my master
Im completely new to XML/XSL/XSLT, and while i have been digging msdn, 3schools.com and
I'm completely stuck. I've been working on a theme that offers 5 different layouts
I have been banging my head against my code for the better part of
We have been working on a project for several months without any problems until
I'm having some inexplicable behaviour using jQuery 1.4.2, and I'm beginning to think that
I have a tab bar app that works. Each tab is a UINavigationController whose

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.