サーバーにダウンロードしている CSV ファイルで PostgreSQL データベースを更新しようとしています。何時間も試してみましたが、ローカルでは完全に機能しますが、サーバー上では機能しません。これが私のコマンドです:
path = "/data/reporting/releases/20150202181737/data/storyboards.csv"
sql = "COPY storyboards (id, name, category, service_line, account_id, account_name, account_salesforce_id, banner_image) FROM \'#{path}\' DELIMITER ',' CSV;"
ActiveRecord::Base.connection.execute(sql)
エラーメッセージは次のとおりです。
COPY storyboards (id, name, category, service_line, account_id, account_name, account_salesforce_id, banner_image) FROM '/data/reporting/releases/20150202181737/data/storyboards.csv' DELIMITER ',' CSV;
PG::InsufficientPrivilege: ERROR: must be superuser to COPY to or from a file
HINT: Anyone can COPY to stdout or from stdin. psql's \copy command also works for anyone.
: COPY storyboards (id, name, category, service_line, account_id, account_name, account_salesforce_id, banner_image) FROM '/data/reporting/releases/20150202181737/data/storyboards.csv' DELIMITER ',' CSV;
ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR: must be superuser to COPY to or from a file
HINT: Anyone can COPY to stdout or from stdin. psql's \copy command also works for anyone.
: COPY storyboards (id, name, category, service_line, account_id, account_name, account_salesforce_id, banner_image) FROM '/data/reporting/releases/20150202181737/data/storyboards.csv' DELIMITER ',' CSV;
これをやろうとしたのは私だけではないと確信しているので、この問題の解決策をお勧めできますか。Engineyard でアプリをホストしています。これは Engineyard の構成の問題ですか?