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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:55:22+00:00 2026-05-14T03:55:22+00:00

I have my csv file in my public folder, and i’m trying to load

  • 0

I have my csv file in my public folder, and i’m trying to load it from a migration, but I get a file not found error using this script :

ActiveRecord::Base.connection.execute(
  "load data local infile '#{RAILS_ROOT}/public/muds_variables.csv' into table muds_variables " +
  "fields terminated by ',' " +
  "lines terminated by '\n' " +
  "(variable_name, definition)")

I’ve checked and re-checked the file path, and that’s definitely where it lives, I’ve also tried it just using the file name without any of the path, and a few other combos, but I can’t make it work :(. can anyone help me out with this?

here’s the error :
Mysql::Error: File ‘/home/chris/rails_projects/muds/public/muds_variables.csv’ not found (Errcode: 2): load data local infile ‘/home/chris/rails_projects/muds/public/muds_variables.csv’ into table muds_variables fields terminated by ‘,’ lines terminated by ‘ ‘ (variable_name, definition)

-C

  • 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-14T03:55:23+00:00Added an answer on May 14, 2026 at 3:55 am

    the answer, is that this should work if you ACTUALLY have a file named muds_variables.csv my file was named muds variables.csv sorry for the waste :/

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

Sidebar

Related Questions

I have created CSVReader and I am trying to read csv file from assets
hi i have a graph created from a .csv file using the jquery $.get().
I have a method that takes data from a .csv file and puts it
i want to download a csv file from a internet url. I have tried
I create a CSV file from a C# application but the characters  are
I am trying to parse a csv file and in the process have come
I have a simple rake task importing records from a CSV file and saving
I'm supposed to add data from my csv file into my database. I have
I have CSV file with sample data in this form : 220 30 255
I have a csv file (5 columns, with | as delimiter) and I want

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.