Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using carrierwave #173

Open
tagliala opened this issue Nov 30, 2014 · 7 comments
Open

Error when using carrierwave #173

tagliala opened this issue Nov 30, 2014 · 7 comments

Comments

@tagliala
Copy link

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

@AndreiRailean
Copy link

👍 +1 for this. doesn't work with carrierwave

@benhutton
Copy link
Contributor

Carrierwave support was broken with this commit: e312508#commitcomment-6785246

@arun057
Copy link

arun057 commented Apr 27, 2015

+1 for this, is carrierwave support coming back?

@twnaing
Copy link

twnaing commented Oct 26, 2015

+1

@arun057
Copy link

arun057 commented Jan 3, 2016

+1 any updates here?

@benhutton
Copy link
Contributor

I haven't run the code myself, but it looks like this should be fixed in master with #183

@arun057
Copy link

arun057 commented Jan 4, 2016

This is the error I got when I tried to set it as the backend. Havent looked in code yet. Maybe documentation is out of date?
NoMethodError: undefined methodbackend=' for Rich:Module`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants