Skip to content

Error when using carrierwave #173

@tagliala

Description

@tagliala

gemfile:

gem 'devise'
gem 'rails_admin'
gem 'kaminari'
gem 'carrierwave', '0.10.0'
gem 'mini_magick'
gem 'rich', github: 'bastiaanterhorst/rich'
#gem 'paperclip'

initializer:

require "rich"

if Object.const_defined?("Rich")
  Rich.setup do |config|
    # == Backend configuration
    # Rich uses Paperclip (https://github.com/thoughtbot/paperclip) by default.
    # You will need to add it to your Gemfile, however.
    # config.backend = :paperclip
    #
    # Optionally, you can use CarrierWave (https://github.com/carrierwaveuploader/carrierwave).
    # You will need to add it to your Gemfile.
    config.backend = :carrierwave
# ...
$ rails s
~/.rvm/gems/ruby-2.1.4/gems/activerecord-4.1.8/lib/active_record/dynamic_matchers.rb:26:in `method_missing': undefined method `has_attached_file' for #<Class:0x007fe8afa39950> (NoMethodError)

I need to include also paperclip in order to make rich work.

I suspect that something here is missing: https://github.com/bastiaanterhorst/rich/blob/a2d866f56277405cb91b648ec3091bda725999df/app/models/rich/rich_file.rb#L13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions