我不知道它的imagemagick或不!我似乎無法得到圖片上傳回形針,我沒有得到錯誤後上傳
這是在我的User.rb,我沒有得到任何錯誤,只是一個空白的圖像!請讓我知道我該如何解決這個問題!
class User < ActiveRecord::Base
has_secure_password
validates :email, :name, presence: true, uniqueness: true
validates_inclusion_of :age, in: 10..100
validates :password, presence: true
has_attached_file :profile_picture,
:path => ":rails_root/public/system/:attachment/:id/:style/:filename",
:url => "/system/:attachment/:id/:style/:filename",
:storage => :fog,
:styles => { :medium => "300x300>", :thumb => "100x100>" },
:default_url => "C:\row\website\public\images"
end
這是我Development.rb,
Rails.application.configure do
config.cache_classes = false
config.eager_load = false
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
config.action_mailer.raise_delivery_errors = false
config.active_support.deprecation = :log
config.active_record.migration_error = :page_load
config.assets.debug = true
config.assets.digest = true
config.assets.raise_runtime_errors = true
Paperclip.options[:command_path] = "C:\ImageMagick"
末
爲Windows 7
':存儲=>:霧,'爲什麼需要它你設置霧憑據? – 2015-02-12 07:44:25
我不這麼認爲,即使我有這樣的設定,它也沒有工作。 – genobambino 2015-02-12 07:45:03
你是否遵循windows 7的安裝步驟,你需要'file.exe'從這裏http://gnuwin32.sourceforge.net/packages/file.htm然後設置env變量你做到了這一點? – 2015-02-12 07:46:14