montera34 / pageonex

PageOneX. Analyzing front pages
http://pageonex.com
GNU Affero General Public License v3.0
54 stars 13 forks source link

How to update the list of newspapers available in a SQL database #162

Closed numeroteca closed 11 years ago

numeroteca commented 11 years ago

I updated the csv of newspapers following the instructions https://github.com/numeroteca/pageonex/wiki#how-to-update-the-list-of-newspapers-available-from-kioskonet

It worked in /dev (sqlite database), but in /production I get the following error

rake aborted!
SQLite3::SQLException: no such table: media: UPDATE "media" SET "working" = 'f' WHERE "media"."working" = 't'

Have the database tables different names?

rahulbot commented 11 years ago

It was trying to run the rake task in development mode, against the (non-used) development database. You have to tell rake to run in production mode. something like this:

rake blah blah blah RAILS_ENV=production

That will load the rails production config and use the production database.