1

Is it possible to export or dump a MySQL database that can be easily imported into SQLite? The export would be initiated by the logged in user of the application so a command line script probably wouldn't be feasible here. Any suggestions or gems that can achieve this?

Thanks!

2
  • 1
    Certainly it's possible, I don't specifically how, but but you should be able to find the answer you're looking for at seanbehan.com/… give that a read and you can setup a script in your lib directory and call it from a controller action Commented Oct 22, 2012 at 20:08
  • Looks cool. Thanks Cyle I'll give it a shot. Commented Oct 22, 2012 at 20:16

1 Answer 1

1

Try yaml_db gem.

With this gem you can dump the data from MySQL and load to SQLite.

Sign up to request clarification or add additional context in comments.

2 Comments

OP doesn't want to have to do it in the command line he wants to do it during runtime.
Well, Rails is perfectly capable of executing arbitrary command line instructions. (A few ways are documented here: rubyquicktips.com/post/5862861056/execute-shell-commands). Not saying there isn't a better way, but it should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.