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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:22:55+00:00 2026-06-13T17:22:55+00:00

When seeding data, I sometimes get an error like this: Owner(#70279918514200) expected, got String(#70279913263500)

  • 0

When seeding data, I sometimes get an error like this:

Owner(#70279918514200) expected, got String(#70279913263500)

Would it be possible for Rake to tell me what record it is choking on?

EDIT:

This has a little more info on what I’m looking for:

I have a flat file which indicates the data I need. This file was created from an unvalidated database that had many different spelling for things like Proctor (and|y|avec|gen) Gamble. I have been able to translate almost all of them, but there have been some that slip through the cracks and still give me trouble. Would it be possible to see from rake which line of the flat file when I run

flat_file.each_line

is causing trouble?

  • 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-06-13T17:22:56+00:00Added an answer on June 13, 2026 at 5:22 pm

    Try running rake db:seed --trace to see what line of your seed.rb file is failing.

    Edit #1: Now that I know you’re using each_line, you may just need to keep a manual count to determine line number.

    line_count = 0
    flat_file.each_line do |line|
      begin
        line_count += 1
        # code for handling `line` goes here
      rescue => e
        puts "Error happened on line #{line_count}: #{e}"
      end
    end
    

    Edit #2: If you’re loading your full file and not streaming it in from its source, you can also get rid of the manual line_count variable that you otherwise have to track with a little help from the String#lines method.

    file_contents.lines.each_with_index do |line, line_count|
      begin
        # code for handling `line` goes here
      rescue => e
        puts "Error happened on line #{line_count}: #{e}"
      end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Somehow, sometimes, I'm ending up in a state like this : > x [1]
When sending data via POST or GET with jQuery you use for format {
I am sending data in database Like Hello fnds, How are you. I am
I got problem with sending data in Android using httpPost. I found some example,
I am having a weird problem with sending data back to my server. This
Here's an interesting problem: I have some jQuery that looks like this: $(document).ready(function() {
This question is a spin-off/evolution of this question . (That question got marked as
I'm sending an Ajax call to the Database to get data to populate and
I would like to send/recieve image files and 2 ints as messages in a
The situation is like this: I have a WCF host with a duplex nettcpbinding

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.