i developing small app download csv file(from give url) everyday , inject data(in csv file) database , load same data in webview. working perfect in local system.but when deployed heroku database injection csv file not working.
here code.
downloader.rake file
namespace :downloader desc "download file" task:downloading => :environment rails.logger.info("message task") download.destroy_all activerecord::base.connection.execute("delete sqlite_sequence name = 'downloads'") #**********some other code ************ end end schedule.rb file
set :environment, 'production' every 1.minutes rake "downloader:downloading" end when run in production shows in log($tail -f log/production.log)
d, [2015-07-21t12:17:02.910529 #11740] debug -- : download load (0.2ms) select "downloads".* "downloads" e, [2015-07-21t12:17:02.910635 #11740] error -- : sqlite3::sqlexception: no such table: downloads: select "downloads".* "downloads"
looks database not ready on heroku.
please veryify have installed mysql database application , run heroku run db:setup build schema , seed it.
Comments
Post a Comment