whenever icon indicating copy to clipboard operation
whenever copied to clipboard

Postgres "relation "myschema.MyTableName" does not exist

Open ivanstojkovicapps opened this issue 9 years ago • 2 comments

Hi,

in schedule.rb i have the following:

  set :output, "cron_log.log"
  set :job_template, "bash -i -c ':job'"
  env :PATH, ENV['PATH']

and

every 1.minutes do
  runner "MyController.new.MyAction", :environment => 'development'
end

in both databases Production and development i have the table and if i execute the same query i get the result. If i take the entry from crontab and execute it in terminal i get the desired Action call, but if cron job tries to execute it it gets:

PG::UndefinedTable: ERROR:  relation "mySchema.MaTableName" does not exist

do you have any suggestions?

regards Ivan

ivanstojkovicapps avatar Mar 07 '15 14:03 ivanstojkovicapps

Maybe you could check the value of Rails.env in the action to ensure it's being set correctly. You will also need to provide the generated crontab, your database.yml and the full log if you require any further help.

benlangfeld avatar Jun 12 '16 17:06 benlangfeld

I believe we can close this issue given that it has no interaction and is stale by now.

cc @benlangfeld

bragamat avatar Nov 13 '23 00:11 bragamat