attempting to do db:migrate on server gives permission error

when i try to run the following

RAILS_ENV=staging bundle exec rake db:migrate

i get

Errno::EACCES: Permission denied @ rb_sysopen - /var/deploy/staging/web_head/releases/20160526222247/db/schema.rb

is there a different user i should be performing this command with?

You’d need to run it like this:

sudo bash -c ‘source /var/.cloud66_env && RAILS_ENV=staging bundle exec rake db:migrate’

You must be logged in to answer this question