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

I have NEVER had this problem before and i am completely stumped. the site
I am completely stumped as to why this code does not get any SDL
I'm completely stumped on this one. I have three different lists that need to
I've been staring at this one for a while and I'm completely stumped. You'll
I am just completely stumped at this and so is my buddy who created
I am completely stumped with this one . . . If I call the
I'm completely stumped as to why this isn't working: flight = Flight.objects.get(pk=flight_id) print old,
Regex is absolutely my weak point and this one has me completely stumped. I
Ok, so this has me completely stumped just like the guy here with the
This has got me completely stumped: print_r($json); echo json_encode($json); output: Array ( [query] =>

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.