document.write('<link rel="stylesheet" href="http://gist.github.com/stylesheets/gist/embed.css"/>')





document.write('<div id=\"gist-225058\" class=\"gist\">\n  \n  \n    \n            \n\n      <div class=\"gist-file\">\n        <div class=\"gist-data gist-syntax\">\n          \n          \n          \n            <div class=\"gist-highlight\"><pre><div class=\"line\" id=\"LC1\">config = Rails::Configuration.new<\/div><div class=\"line\" id=\"LC2\">database = config.database_configuration[RAILS_ENV][&quot;database&quot;]<\/div><div class=\"line\" id=\"LC3\">&nbsp;<\/div><div class=\"line\" id=\"LC4\">namespace :db do<\/div><div class=\"line\" id=\"LC5\">&nbsp;&nbsp;<\/div><div class=\"line\" id=\"LC6\">&nbsp;&nbsp;#rake db:dump<\/div><div class=\"line\" id=\"LC7\">&nbsp;&nbsp;desc &quot;dumps the database to a sql file&quot;<\/div><div class=\"line\" id=\"LC8\">&nbsp;&nbsp;task :dump =&gt; :environment do<\/div><div class=\"line\" id=\"LC9\">&nbsp;&nbsp;&nbsp;&nbsp;puts &quot;Creating #{database}.sql file.&quot;<\/div><div class=\"line\" id=\"LC10\">&nbsp;&nbsp;&nbsp;&nbsp;`sqlite3 #{database} .dump &gt; #{database}.sql`<\/div><div class=\"line\" id=\"LC11\">&nbsp;&nbsp;end<\/div><div class=\"line\" id=\"LC12\">&nbsp;<\/div><div class=\"line\" id=\"LC13\">&nbsp;&nbsp;#rake db:dumpimport - Resets the DB.<\/div><div class=\"line\" id=\"LC14\">&nbsp;&nbsp;desc &quot;imports the #{database}.sql file to the current db&quot;<\/div><div class=\"line\" id=\"LC15\">&nbsp;&nbsp;task :dumpimport =&gt; [:environment, :reset] do<\/div><div class=\"line\" id=\"LC16\">&nbsp;&nbsp;&nbsp;&nbsp;`sqlite3 #{database} &lt; #{database}.sql`<\/div><div class=\"line\" id=\"LC17\">&nbsp;&nbsp;end<\/div><div class=\"line\" id=\"LC18\">&nbsp;<\/div><div class=\"line\" id=\"LC19\">end<\/div><div class=\"line\" id=\"LC20\">&nbsp;<\/div><\/pre><\/div>\n          \n        <\/div>\n\n        <div class=\"gist-meta\">\n          <a href=\"http://gist.github.com/raw/225058/4cb3dff3fa3ed7ac0a3730202d5f9db906557ad0/gistfile1.txt\" style=\"float:right;\">view raw<\/a>\n          <a href=\"http://gist.github.com/225058#file_gistfile1.txt\" style=\"float:right;margin-right:10px;color:#666\">gistfile1.txt<\/a>\n          <a href=\"http://gist.github.com/225058\">This Gist<\/a> brought to you by <a href=\"http://github.com\">GitHub<\/a>.\n        <\/div>\n      <\/div>\n    \n  \n<\/div>\n')
