Comments (8)
Thanks for reporting. Can you include a backtrace please?
from delayed_paperclip.
Hi,
Earlier i have two gem in my gem file. one is paperclip and another one is delayed_paperclip. Now i have removed paperclip gem. Now it is working fine. Here i am adding the backtrace
EXCEPTION IS:
undefined local variable or method `attachment_definitions' for #<Class:0x00000009975190>
["/home/paradigm/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.12/lib/active_record/dynamic_matchers.rb:55:in `method_missing'",
"/home/paradigm/.rvm/gems/ruby-1.9.3-p448/bundler/gems/delayed_paperclip-5b25db8968ab/lib/delayed_paperclip.rb:51:in `process_in_background'",
"/home/paradigm/workspace/ActiveFam/app/models/resource.rb:29:in `<class:Resource>'",
"/home/paradigm/workspace/ActiveFam/app/models/resource.rb:1:in `<top (required)>'",
"/home/paradigm/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:469:in `load'",
"/home/paradigm/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:469:in `block in load_file'",
"/home/paradigm/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:639:in `new_constants_in'",
"/home/paradigm/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:468:in `load_file'",
"/home/paradigm/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:353:in `require_or_load'",
"/home/paradigm/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:502:in `load_missing_constant'",
"/home/paradigm/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:192:in `block in const_missing'",
"/home/paradigm/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `each'",
"/home/paradigm/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `const_missing'",
"/home/paradigm/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:514:in `load_missing_constant'",
"/home/paradigm/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:192:in `block in const_missing'",
"/home/paradigm/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `each'",
"/home/paradigm/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in
Also how do we get the original url before generating the style? Can you please help me out.
from delayed_paperclip.
attachment_definitions
is a class method method for a model that has_attached_file
. When you install the paperclip gem. Did you have the line has_attached_file
in your resource model?
from delayed_paperclip.
hi please find the attached code in my model
has_attached_file :image , :default_url => "/assets/member.png",
:storage => :s3,
:bucket => ENV['AMAZON_BUCKET_NAME'],
:s3_credentials => {
:access_key_id => ENV['AMAZON_API_KEY'],
:secret_access_key => ENV['AMAZON_API_SECRET']
},
:s3_protocol => "https",
:styles => {
:big => "600X600!",
:large => "300x300!",
:thumb => "148x121!",
:gallery => "130x112!",
:medium => "70X72!",
:tiny => "67X55!",
:small =>"21X21!"
}
validates_attachment_content_type :image, :content_type => ['image/gif','image/jpeg','image/png','image/bmp'] ,:message => 'must be gif,jpeg,png,bmp'
validates_attachment_size :image, :less_than => 10.megabytes
process_in_background :image, :only_process => [:big, :large,:thumb, :gallery,:medium,:small,:tiny]
from delayed_paperclip.
Nothing looks wrong on the surface. What versions of paperclip and delayed_paperclip are you using?
from delayed_paperclip.
Please find the gem files which we are using in my app.
gem "paperclip", :git => "git://github.com/thoughtbot/paperclip.git"
gem 'delayed_paperclip', :git => "https://github.com/jrgifford/delayed_paperclip"
from delayed_paperclip.
Is there a reason you're using the master branch of both gems? Try just
gem 'paperclip'
gem 'delayed_paperclip'
from delayed_paperclip.
It looks like paperclip 3.5 is what creates this problem. Lock your paperclip version to 3.4.2
gem 'paperclip', '3.4.2'
from delayed_paperclip.
Related Issues (20)
- Latest commit to paperclip master breaks gem HOT 1
- undefined method `[]=' for nil:NilClass HOT 2
- Delayed Job w/ s3, Missing required :bucket option error HOT 11
- FFMPEG hangs/stalls when converting large files HOT 1
- Errors are silently swallowed instead of being raised to the background processor HOT 1
- Needs a failure callback
- Not saving original file - only those styles specified in only_process are created HOT 4
- paperclip-document style is not working with background
- Gem doesn't work with S3 HOT 4
- Handle Record Not Found Exceptions HOT 2
- NoMethodError: undefined method `fetch' for nil:NilClass with postgres HOT 1
- Release latest changes in master
- Support Priority of DelayedJob. HOT 2
- Processors not being called HOT 2
- Job failed to load: undefined class/module DelayedPaperclip
- Linking existing S3 object to Paperclip does not trigger Delayed::Job HOT 1
- Not generating cropped images when using papercrop
- Creates original style twice on S3
- How to skip process_in_background method call in some case
- Avoid creating jobs when nothing to process
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from delayed_paperclip.