conohaのオブジェクトストレージとcarrierwaveを使用して、herokuにpushができずに困っています。
現在の状況としては、conohaのオブジェトストレージ内には、事前にrubyプログラムを書いてコンテナを作成済み。
cloud9から、ローカルでの動作確認はクリア。
#herokuの状況
herokuへの環境設定にて、以下を登録済み(ローカル確認時と同じ情報をherokuの環境設定で使用)
CONOHA_API_AUTH_URL: https://***/v2.0 CONOHA_API_PASSWORD: hogehogepw CONOHA_ASSET_HOST: https://object-storage.tyo1.conoha.io/v1/********hogehoge CONOHA_CONTAINER_NAME: public CONOHA_TENANT_NAME: hogehogeid CONOHA_USERNAME: hogehogename
#initializers/carrierwave.rbの中
ruby
1CarrierWave.configure do |config| 2 if Rails.env.production? 3 config.fog_credentials = { 4 provider: 'OpenStack', 5 openstack_tenant: ENV['CONOHA_TENANT_NAME'], 6 openstack_username: ENV['CONOHA_USERNAME'], 7 openstack_api_key: ENV['CONOHA_API_PASSWORD'], 8 openstack_auth_url: ENV['CONOHA_API_AUTH_URL'] + '/tokens', 9 } 10 config.fog_directory = ENV['CONOHA_CONTAINER_NAME'] 11 config.storage :fog 12 config.asset_host = ENV['CONOHA_ASSET_HOST'] + '/' + ENV['CONOHA_CONTAINER_NAME'] 13 else 14 config.storage :file 15 end 16end
#herokuへpush時のエラー内容
remote: Running: rake assets:precompile remote: rake aborted! remote: Excon::Errors::Unauthorized: Expected([200, 204]) <=> Actual(401 Unauthorized) remote: excon.error.response remote: :body => "{\"error\": {\"message\": \"Invalid user / password (Disable debug mode to suppress these details.)\", \"code\": 401, \"title\": \"Unauthorized\"}}" remote: :cookies => [ remote: ] remote: :headers => { remote: "Connection" => "keep-alive" remote: "Content-Length" => "135" remote: "Content-Type" => "application/json" remote: "Date" => "Fri, 17 Jun 2016 11:54:00 GMT" remote: "Server" => "openresty/1.7.10.1" remote: } remote: :host => "identity.tyo1.conoha.io" remote: :local_address => "***.***.***.***" remote: :local_port => 57389 remote: :path => "/v2.0/tokens" remote: :port => 443 remote: :reason_phrase => "Unauthorized" remote: :remote_ip => "***.***.***.***" remote: :status => 401 remote: :status_line => "HTTP/1.1 401 Unauthorized\r\n"
すみませんが、ご教授よろしくお願いします。
あなたの回答
tips
プレビュー