# EXIFIR problem

**URL:** <https://www.ruby-forum.com/t/exifir-problem/186424>\
**Category:** Rails\
**Created:** [April 7, 2010, 12:56am UTC](https://www.ruby-forum.com/t/exifir-problem/186424 "2010-04-07T00:56:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/59ef9b/32.png) [@johnk](https://www.ruby-forum.com/u/johnk)\
**Post date:** [April 7, 2010, 12:56am UTC](https://www.ruby-forum.com/t/exifir-problem/186424/1 "2010-04-07T00:56:25Z")

</div>

class Photo \< ActiveRecord::Base  
belongs\_to :album  
after\_create :set\_exif\_data  
has\_attached\_file :image,  
:styles =\> {  
:display =\> “300x200”  
}  
def set\_exif\_data  
logger.debug “setting exif”  
exif = EXIFR::JPEG.new( self.photo.path )  
logger.debug"setting exif2"  
return if exif.nil? or not exif.exif?  
self.width = exif.width  
self.height = exif.height

is there something wrong here? the first logger.debug runs, but not the  
second…
