Cloudinary only works locally and not in production
I have a problem with deploying my app on heroku ... it's been several hours since I tried to use Cloudinary with my Heroku app.
I followed literally different tutorials from Cloudinary.
EDIT
When I download photos on my local app, i find them on Cloudinary ! How to make it also on my Heroku app ? :/
Gemfile
# paperclip
gem 'paperclip'
gem 'paperclip-cloudinary'
config/cloudinary.yml
production:
cloud_name: hoxr8ugj3
api_key: 'xxx'
api_secret: xxxx
enhance_image_tag: true
static_image_support: true
models/photo.rb
class Photo < ApplicationRecord
belongs_to :projet
has_attached_file :image, :styles => { :medium => "300x300>", :thumb => "100x100>" }
validates_attachment_content_type :image, :content_type => /Aimage/.*Z/
end
config/environments/production.rb
Paperclip::Attachment.default_options.merge!({
:storage => :cloudinary,
:path => ':id/:style/:filename'
})
Everything works perfectly locally ... I do not understand! :(
With git push heroku master
, i get this warning You set your
config.active_storage.serviceto :local in production.
I probably need to change some things in storage.yml
? or create secret.yml
? but how ?
storage.yml
test:
service: Disk
root: <%= Rails.root.join("tmp/storage") %>
local:
service: Disk
root: <%= Rails.root.join("storage") %>
I also tried :
heroku config:add CLOUDINARY_URL=....
heroku logs error :
ate (1.5ms) INSERT INTO "photos" ("projet_id", "created_at", "updated_at", "image_file_name", "image_content_type", "image_file_size", "image_updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["projet_id", 1], ["created_at", "2018-11-15 12:07:04.278472"], ["updated_at", "2018-11-15 12:07:04.278472"], ["image_file_name", "zenploylogo.png"], ["image_content_type", "image/png"], ["image_file_size", 21847], ["image_updated_at", "2018-11-15 12:07:03.988840"]]
2018-11-15T12:07:04.443055+00:00 app[web.1]: D, [2018-11-15T12:07:04.442918 #4] DEBUG -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8] (1.0ms) ROLLBACK
2018-11-15T12:07:04.443536+00:00 app[web.1]: I, [2018-11-15T12:07:04.443455 #4] INFO -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8] Completed 500 Internal Server Error in 523ms (ActiveRecord: 9.6ms)
2018-11-15T12:07:04.444215+00:00 app[web.1]: F, [2018-11-15T12:07:04.444142 #4] FATAL -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8]
2018-11-15T12:07:04.444288+00:00 app[web.1]: F, [2018-11-15T12:07:04.444211 #4] FATAL -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8] KeyError (key not found: :ciphers):
2018-11-15T12:07:04.444339+00:00 app[web.1]: F, [2018-11-15T12:07:04.444280 #4] FATAL -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8]
2018-11-15T12:07:04.444393+00:00 app[web.1]: F, [2018-11-15T12:07:04.444338 #4] FATAL -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8] app/controllers/projets_controller.rb:63:in `block in update'
Thank you very much for your help and sorry for my english.
ruby-on-rails heroku storage cloudinary
add a comment |
I have a problem with deploying my app on heroku ... it's been several hours since I tried to use Cloudinary with my Heroku app.
I followed literally different tutorials from Cloudinary.
EDIT
When I download photos on my local app, i find them on Cloudinary ! How to make it also on my Heroku app ? :/
Gemfile
# paperclip
gem 'paperclip'
gem 'paperclip-cloudinary'
config/cloudinary.yml
production:
cloud_name: hoxr8ugj3
api_key: 'xxx'
api_secret: xxxx
enhance_image_tag: true
static_image_support: true
models/photo.rb
class Photo < ApplicationRecord
belongs_to :projet
has_attached_file :image, :styles => { :medium => "300x300>", :thumb => "100x100>" }
validates_attachment_content_type :image, :content_type => /Aimage/.*Z/
end
config/environments/production.rb
Paperclip::Attachment.default_options.merge!({
:storage => :cloudinary,
:path => ':id/:style/:filename'
})
Everything works perfectly locally ... I do not understand! :(
With git push heroku master
, i get this warning You set your
config.active_storage.serviceto :local in production.
I probably need to change some things in storage.yml
? or create secret.yml
? but how ?
storage.yml
test:
service: Disk
root: <%= Rails.root.join("tmp/storage") %>
local:
service: Disk
root: <%= Rails.root.join("storage") %>
I also tried :
heroku config:add CLOUDINARY_URL=....
heroku logs error :
ate (1.5ms) INSERT INTO "photos" ("projet_id", "created_at", "updated_at", "image_file_name", "image_content_type", "image_file_size", "image_updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["projet_id", 1], ["created_at", "2018-11-15 12:07:04.278472"], ["updated_at", "2018-11-15 12:07:04.278472"], ["image_file_name", "zenploylogo.png"], ["image_content_type", "image/png"], ["image_file_size", 21847], ["image_updated_at", "2018-11-15 12:07:03.988840"]]
2018-11-15T12:07:04.443055+00:00 app[web.1]: D, [2018-11-15T12:07:04.442918 #4] DEBUG -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8] (1.0ms) ROLLBACK
2018-11-15T12:07:04.443536+00:00 app[web.1]: I, [2018-11-15T12:07:04.443455 #4] INFO -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8] Completed 500 Internal Server Error in 523ms (ActiveRecord: 9.6ms)
2018-11-15T12:07:04.444215+00:00 app[web.1]: F, [2018-11-15T12:07:04.444142 #4] FATAL -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8]
2018-11-15T12:07:04.444288+00:00 app[web.1]: F, [2018-11-15T12:07:04.444211 #4] FATAL -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8] KeyError (key not found: :ciphers):
2018-11-15T12:07:04.444339+00:00 app[web.1]: F, [2018-11-15T12:07:04.444280 #4] FATAL -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8]
2018-11-15T12:07:04.444393+00:00 app[web.1]: F, [2018-11-15T12:07:04.444338 #4] FATAL -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8] app/controllers/projets_controller.rb:63:in `block in update'
Thank you very much for your help and sorry for my english.
ruby-on-rails heroku storage cloudinary
add a comment |
I have a problem with deploying my app on heroku ... it's been several hours since I tried to use Cloudinary with my Heroku app.
I followed literally different tutorials from Cloudinary.
EDIT
When I download photos on my local app, i find them on Cloudinary ! How to make it also on my Heroku app ? :/
Gemfile
# paperclip
gem 'paperclip'
gem 'paperclip-cloudinary'
config/cloudinary.yml
production:
cloud_name: hoxr8ugj3
api_key: 'xxx'
api_secret: xxxx
enhance_image_tag: true
static_image_support: true
models/photo.rb
class Photo < ApplicationRecord
belongs_to :projet
has_attached_file :image, :styles => { :medium => "300x300>", :thumb => "100x100>" }
validates_attachment_content_type :image, :content_type => /Aimage/.*Z/
end
config/environments/production.rb
Paperclip::Attachment.default_options.merge!({
:storage => :cloudinary,
:path => ':id/:style/:filename'
})
Everything works perfectly locally ... I do not understand! :(
With git push heroku master
, i get this warning You set your
config.active_storage.serviceto :local in production.
I probably need to change some things in storage.yml
? or create secret.yml
? but how ?
storage.yml
test:
service: Disk
root: <%= Rails.root.join("tmp/storage") %>
local:
service: Disk
root: <%= Rails.root.join("storage") %>
I also tried :
heroku config:add CLOUDINARY_URL=....
heroku logs error :
ate (1.5ms) INSERT INTO "photos" ("projet_id", "created_at", "updated_at", "image_file_name", "image_content_type", "image_file_size", "image_updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["projet_id", 1], ["created_at", "2018-11-15 12:07:04.278472"], ["updated_at", "2018-11-15 12:07:04.278472"], ["image_file_name", "zenploylogo.png"], ["image_content_type", "image/png"], ["image_file_size", 21847], ["image_updated_at", "2018-11-15 12:07:03.988840"]]
2018-11-15T12:07:04.443055+00:00 app[web.1]: D, [2018-11-15T12:07:04.442918 #4] DEBUG -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8] (1.0ms) ROLLBACK
2018-11-15T12:07:04.443536+00:00 app[web.1]: I, [2018-11-15T12:07:04.443455 #4] INFO -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8] Completed 500 Internal Server Error in 523ms (ActiveRecord: 9.6ms)
2018-11-15T12:07:04.444215+00:00 app[web.1]: F, [2018-11-15T12:07:04.444142 #4] FATAL -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8]
2018-11-15T12:07:04.444288+00:00 app[web.1]: F, [2018-11-15T12:07:04.444211 #4] FATAL -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8] KeyError (key not found: :ciphers):
2018-11-15T12:07:04.444339+00:00 app[web.1]: F, [2018-11-15T12:07:04.444280 #4] FATAL -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8]
2018-11-15T12:07:04.444393+00:00 app[web.1]: F, [2018-11-15T12:07:04.444338 #4] FATAL -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8] app/controllers/projets_controller.rb:63:in `block in update'
Thank you very much for your help and sorry for my english.
ruby-on-rails heroku storage cloudinary
I have a problem with deploying my app on heroku ... it's been several hours since I tried to use Cloudinary with my Heroku app.
I followed literally different tutorials from Cloudinary.
EDIT
When I download photos on my local app, i find them on Cloudinary ! How to make it also on my Heroku app ? :/
Gemfile
# paperclip
gem 'paperclip'
gem 'paperclip-cloudinary'
config/cloudinary.yml
production:
cloud_name: hoxr8ugj3
api_key: 'xxx'
api_secret: xxxx
enhance_image_tag: true
static_image_support: true
models/photo.rb
class Photo < ApplicationRecord
belongs_to :projet
has_attached_file :image, :styles => { :medium => "300x300>", :thumb => "100x100>" }
validates_attachment_content_type :image, :content_type => /Aimage/.*Z/
end
config/environments/production.rb
Paperclip::Attachment.default_options.merge!({
:storage => :cloudinary,
:path => ':id/:style/:filename'
})
Everything works perfectly locally ... I do not understand! :(
With git push heroku master
, i get this warning You set your
config.active_storage.serviceto :local in production.
I probably need to change some things in storage.yml
? or create secret.yml
? but how ?
storage.yml
test:
service: Disk
root: <%= Rails.root.join("tmp/storage") %>
local:
service: Disk
root: <%= Rails.root.join("storage") %>
I also tried :
heroku config:add CLOUDINARY_URL=....
heroku logs error :
ate (1.5ms) INSERT INTO "photos" ("projet_id", "created_at", "updated_at", "image_file_name", "image_content_type", "image_file_size", "image_updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["projet_id", 1], ["created_at", "2018-11-15 12:07:04.278472"], ["updated_at", "2018-11-15 12:07:04.278472"], ["image_file_name", "zenploylogo.png"], ["image_content_type", "image/png"], ["image_file_size", 21847], ["image_updated_at", "2018-11-15 12:07:03.988840"]]
2018-11-15T12:07:04.443055+00:00 app[web.1]: D, [2018-11-15T12:07:04.442918 #4] DEBUG -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8] (1.0ms) ROLLBACK
2018-11-15T12:07:04.443536+00:00 app[web.1]: I, [2018-11-15T12:07:04.443455 #4] INFO -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8] Completed 500 Internal Server Error in 523ms (ActiveRecord: 9.6ms)
2018-11-15T12:07:04.444215+00:00 app[web.1]: F, [2018-11-15T12:07:04.444142 #4] FATAL -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8]
2018-11-15T12:07:04.444288+00:00 app[web.1]: F, [2018-11-15T12:07:04.444211 #4] FATAL -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8] KeyError (key not found: :ciphers):
2018-11-15T12:07:04.444339+00:00 app[web.1]: F, [2018-11-15T12:07:04.444280 #4] FATAL -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8]
2018-11-15T12:07:04.444393+00:00 app[web.1]: F, [2018-11-15T12:07:04.444338 #4] FATAL -- : [5e1f39fa-7d71-4b07-bc23-2696425689d8] app/controllers/projets_controller.rb:63:in `block in update'
Thank you very much for your help and sorry for my english.
ruby-on-rails heroku storage cloudinary
ruby-on-rails heroku storage cloudinary
edited Dec 28 '18 at 22:55
Clyde T
asked Nov 15 '18 at 11:52
Clyde TClyde T
789
789
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
This issue has to do with a bug in the Cloudinary gem update to 1.10.0. See https://github.com/cloudinary/cloudinary_gem/issues/322
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53318901%2fcloudinary-only-works-locally-and-not-in-production%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This issue has to do with a bug in the Cloudinary gem update to 1.10.0. See https://github.com/cloudinary/cloudinary_gem/issues/322
add a comment |
This issue has to do with a bug in the Cloudinary gem update to 1.10.0. See https://github.com/cloudinary/cloudinary_gem/issues/322
add a comment |
This issue has to do with a bug in the Cloudinary gem update to 1.10.0. See https://github.com/cloudinary/cloudinary_gem/issues/322
This issue has to do with a bug in the Cloudinary gem update to 1.10.0. See https://github.com/cloudinary/cloudinary_gem/issues/322
answered Nov 17 '18 at 1:47
KevinNeubKevinNeub
112
112
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53318901%2fcloudinary-only-works-locally-and-not-in-production%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown