rich
rich copied to clipboard
undefined method 'has_attached_file'
> Booting WEBrick
=> Rails 4.1.8 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
Exiting
/Volumes/D/KonsultacjeSpoleczneJastrzebieZdroj/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.8/lib/active_record/dynamic_matchers.rb:26:in `method_missing': undefined method `has_attached_file' for #<Class:0x007fbc1689b230> (NoMethodError)
from /Volumes/D/KonsultacjeSpoleczneJastrzebieZdroj/vendor/bundle/ruby/2.2.0/bundler/gems/rich-2ee815f0d8f5/app/models/rich/rich_file.rb:13:in `<class:RichFile>'
After clean install from git gem. Any idea why is that happening?
Ok, i see now that's problem with carrierwave. But why is model using only paperclip function?
I don't have that time today and tomorrow, would be nice if someone could dig into this.
Looks like duplicate paperclip related code in app/models/rich/rich_file.rb
and lib/rich/backends/paperclip.rb
:+1:
I moved all paperclip code to paperclip.rb
(https://github.com/kreativgebiet/rich/pull/183) and it works fine with paperclip and carrierwave
This seems to have a pull request, can it be merged?
I'm having this issue as well - and I definitely have the paperclip gem installed. I'm using Rails 5 and paperclip 5, which is likely the issue.
Any suggestions?
=> Rails 5.0.0.rc2 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
Exiting
/Users/ecook/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.0.rc2/lib/active_record/dynamic_matchers.rb:21:in `method_missing': undefined method `has_attached_file' for #<Class:0x007fef9578aa00> (NoMethodError)
from /Users/ecook/.rvm/gems/ruby-2.3.1/bundler/gems/rich-2c8f85438e73/lib/rich/backends/paperclip.rb:9:in `block in <module:Paperclip>'