whenever
whenever copied to clipboard
Postgres "relation "myschema.MyTableName" does not exist
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
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.
I believe we can close this issue given that it has no interaction and is stale by now.
cc @benlangfeld