我不知道它的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