H.Akca
H.Akca

Reputation: 53

Rails : key not found: :ciphers

I have a problem with Carriwave/Cloudinary.

Since the admin space, I add an image for an article. The problem is that when I upload it I have the below error.

I'm on windows and I use the command line Ubuntu for Windows. Can it come from that?

enter image description here

Here is my code here:

post.rb in admin:

ActiveAdmin.register Post do
      permit_params :title, :content, :photo



        index do
          selectable_column
          id_column
          column "titre", :title
          column "Contenu", :content
          column "Création", :created_at
          column "Editer", :updated_at
          actions
        end

        form do |f|
          f.inputs do
            f.input :title, required: true, hint: 'Merci d\'ajouter un titre'
            f.input :content, :class => "tinymce", :rows => 40, :cols => 120, required: true
            f.input :photo, required: true, hint: 'Photo obligatoire'
          actions
        end
      end
    end

photo_uploader.rb

class PhotoUploader < CarrierWave::Uploader::Base
    include Cloudinary::CarrierWave

    version :large do
      process resize_to_fill: [350,200]
    end

    version :standard do
        process resize_to_fill: [250,200, :north]
    end

    version :thumb do
        process resize_to_fit: [50,50]
    end

    def store_dir
      "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
    end

    process resize_to_fit: [200, 200]

    def extension_whitelist
      %w(jpg jpeg gif png)
    end

  end

post.rb

has_many :comments

mount_uploader :photo, PhotoUploader

Upvotes: 2

Views: 1874

Answers (1)

Shirly Manor
Shirly Manor

Reputation: 301

It seems like an issue with Cloudinary. As a workaround please refer to : https://github.com/cloudinary/cloudinary_gem/issues/322

We will update you here when the issue will be fixed but no ETA yet.

Upvotes: 1

Related Questions