我已將我的Mac更新爲10.9.2(小牛),我的導軌/自制軟件環境已經崩潰。我已經解決了大部分問題,但我一直試圖讓回形針使用ImageMagick。它在上週工作,但我已經改變了一些讓其他事情發揮作用的東西。封面回形針::錯誤:: NotIdentifiedByImageMagickError
# gem file
gem "paperclip", "~> 4.1"
#model
has_attached_file :cover,
:styles => { :medium => "600x300>", :thumb => "100x100>" },
:url => "/assets/providers/:id/:style/:basename.:extension",
:path => ":rails_root/public/assets/providers/:id/:style/:basename.:extension"
validates_attachment_content_type :cover, :content_type => ['image/jpeg', 'image/png']
validates_attachment_size :cover, :less_than => 5.megabytes
before_validation :clear_cover
我收到錯誤消息:
Cover Paperclip::Errors::NotIdentifiedByImageMagickError
因爲那裏有與庫更新後,許多問題沒有安裝/發現我試圖重新安裝ImageMagick的,但得到:
Warning: imagemagick-6.8.9-1 already installed
所以我嘗試
brew uninstall imagemagick
brew install imagemagick
歷時可疑一點時間:
Already downloaded: /Library/Caches/Homebrew/imagemagick-6.8.9-1.mavericks.bottle.tar.gz
==> Pouring imagemagick-6.8.9-1.mavericks.bottle.tar.gz
/usr/local/Cellar/imagemagick/6.8.9-1: 1432 files, 22M
我看到周圍SO &網絡提出了一些建議,其中沒有一個工作:
brew install ghostscript
brew install libtool
由於在建議意見,我想跑:
$ identify -format '%wx%h,1' 'test.jpg'
,但得到:
dyld: Library not loaded: /usr/local/lib/libltdl.7.dylib
Referenced from: /usr/local/bin/identify
Reason: image not found
Trace/BPT trap: 5
我不確定最好的解決方案是什麼?
我讀了這個post它增加了一個符號鏈接到庫,但這只是一個補丁或propper修復?
我試圖做的: $釀造安裝的libtool --universal
,但得到
警告:libtool的-2.4.2已經安裝
我跑
$ brew install imagemagick --build-from-source
和在發生了一些麻煩之後,現在我們得到一個新的錯誤:
identify: no decode delegate for this image format `JPEG' @ error/constitute.c/ReadImage/501.
這可能是值得注意的我得到了我的桌面上的macbook &完全相同的問題。
其轉換並確定返回什麼都沒有,所以我嘗試:沖泡取消鏈接ImageMagick的&&釀造環節的ImageMagick – Will
現在我得到➜軌道的git:(AA)✗其識別 的/ usr/local/bin/identify ➜rails git:(aa)✗其中 /usr/local/bin/convert – Will
仍然出現相同的錯誤 – Will