I have a RoR project living on heroics. I have bootsy (an editor with image loading functions) and I have a cloud one. Ive setup uploader, keys and initializers for cloud api (can show you if necessary). Now, when I try to upload an image to bootsy - it creates a database row and creates an image in the cloud. But in the js window from bootsy, there is empty <img>
ruby '2.3.1' gem 'rails', '~> 5.1.1' gem 'bootsy' gem 'carrierwave' gem 'fog' gem 'cloudinary', '~> 1.8.1'
1) uploaders / bootsy / image_uploader.rb
module Bootsy class ImageUploader < CarrierWave::Uploader::Base include CarrierWave::MiniMagick # storage Bootsy.storage include Cloudinary::CarrierWave def store_dir "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end version :large do process :eager => true process resize_to_fit: [ 700, 700 ] end version :medium do process :eager => true process resize_to_fit: [ 300, 300 ] end version :small do process :eager => true process resize_to_fit: [ 150, 150 ] end version :thumb do process :eager => true process resize_to_fit: [ 150, 150 ] end def extension_white_list %w(jpg jpeg gif png) end end end
2) initializers /bootsy.rb
Bootsy.setup do |config| config.image_versions_available = [:small, :medium, :large, :original] config.storage = :fog end
3) models / article.rb
class Article < ApplicationRecord include Bootsy::Container mount_uploader :image, Bootsy::ImageUploader mount_uploader :main_image, ArticleImageUploader mount_uploader :list_image, ArticleImageUploader end

PS Well, I really don't know, I'm just repeating this mistake in a public repository. https://bitbucket.org/dekakisalove/bootsy_tes/ I will add generosity to this issue as soon as possible.
ruby-on-rails heroku cloudinary
Legendary
source share