mtg_scraper provides a ready to use PostgreSQL database containing Magic: the gathering cards and sets as well as a script to download fresh database from https://gatherer.wizards.com
You can download the latest DB dump on Releases page
Database connection can be configured in lib/mtg_scraper/db.rb
rake db:create # initialize DB structure
rake scrape