【发布时间】:2015-02-12 07:32:13
【问题描述】:
我不确定它是不是 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"
结束
【问题讨论】:
-
:storage => :fog,为什么需要设置雾凭据? -
我不这么认为,但在我有那个设置之前它甚至都没有工作。
-
你是否按照你需要的Windows 7安装步骤
file.exe从这里gnuwin32.sourceforge.net/packages/file.htm然后设置环境变量你这样做了吗? -
我没有,你能解释一下为什么我什至需要使用雾吗?如果我不需要,有没有办法设置它以便我仍然可以上传图片?
-
我正在为你在 windows 7 上发帖
标签: ruby-on-rails imagemagick paperclip fog