|
# 1.先安装 ImageMagick: http://www.imagemagick.org/script/binary-releases.php#windows # 2.创建 initializers 文件:config/initializers/paperclip.rb 存入下面的代码 # 3.重启 webserver # 设置 command_path ,请将 c:/program files/imagemagick-6.5.5-Q16 改为你的 ImageMagick 的安装目录 Paperclip.options[:command_path] = "c:/program files/imagemagick-6.5.5-Q16" Paperclip.options[:swallow_stderr] = false def run cmd, params = "", expected_outcodes = 0 command = %Q<#{%Q[#{path_for_command(cmd)} #{params}].gsub(/\s+/, " ")}> command = "#{command} 2>#{bit_bucket}" if Paperclip.options[:swallow_stderr] output = `#{command}` unless [expected_outcodes].flatten.include?($?.exitstatus) raise PaperclipCommandLineError, "Error while running #{cmd}" end output end
|
转载自 http://pasite.org/code/189
分享到:
相关推荐
Rails::API 是 Rails 的精简版本,针对不需要使用完整 Rails 功能的开发者。 Rails::API 移除了 ActionView 和其他一些渲染功能,不关心Web前端的开发者可更容易、快速地开发应用程序,因此运行速度比正常的 Rails ...
Component-Based Rails Applications: Large Domains Under Control (Addison-Wesley Professional Ruby Series) By 作者: Stephan Hagemann ISBN-10 书号: 0134774582 ISBN-13 书号: 9780134774589 Edition 版本: ...
本书教您如何使用Ruby on Rails开发和部署真正的,具有工业实力的Web应用程序,Ruby on Rails是为诸如Twitter,Hulu,GitHub和Yellow Pages等顶级网站提供支持的开源Web框架。
Rails Plugins:Extending Rails Beyond the Core
Ruby.on.Rails.Tutorial,Learn.Web.Development.with.Rails,Third.Edition-中文版 文字版.pdf 个人收集电子书,仅用学习使用,不可用于商业用途,如有版权问题,请联系删除!
gem "mongoid_rails_migrations" 如何使用 创建迁移 $ rails generate mongoid:migration 运行迁移: $ rails db:migrate $ rails db:migrate:down VERSION= $ rails db:migrate:up VERSION= $ rails db:rollback...
NULL 博文链接:https://mylir.iteye.com/blog/800734
“开发人员的笔记本”记录了一些准则,技术和想法,这些准则,技术和想法将经典的面向对象的思想应用于Ruby on Rails应用程序。
GraphiQL-Rails 在 Ruby on Rails 中挂载 。 安装 添加到您的 Gemfile: gem "graphiql-rails" 用法 安装引擎 将引擎添加到routes.rb : # config/routes.rb Rails . application . routes . draw do # ... ...
附上Jamis的rdoc模板文件,tar解压即可。 博文链接:https://lgn21st.iteye.com/blog/199681
RAILS: Radial Assembly Improvement by Long Sequence Scaffolding Cobbler: Gap-filling with long sequences 描述 RAILS 和 Cobbler 是基因组学应用程序,用于支架和自动完成具有长 DNA 序列的基因组组装。 它们...
Rails.root / app / models / user.rb-包含Mongoid :: Paperclip模块并调用提供的类方法class User include Mongoid :: Document include Mongoid :: Paperclip has_mongoid_attached_file :avatarend就是这样那...
SwaggerYard :: Rails SwaggerYard :: Rails gem是一个Rails引擎,旨在使用SwaggerYard解析您的Yardocs API控制器。 它将创建一个Swagger-UI投诉JSON,以通过安装SwaggerYard :: Rails :: Engine的位置提供。安装将...
克隆/下载仓库确保Postgres数据库正在运行运行bundle install从Gemfile安装所有gem 运行rails db:drop然后运行rails db:drop rails db:create然后rails db:migrate创建数据库表要启动服务器,请运行命令rails s 在...
Learn Web Development with Rails Clear EPUB version in English, Second Edition “The author is clearly an expert at the Ruby language and the Rails framework, but more than that, he is a working ...
将administrate-field-paperclip clipclip和kt-paperclip paperclip添加到您的Gemfile中: gem 'administrate-field-paperclip' gem 'kt-paperclip' 安装: $ bundle install 用法 按照上的开始使用模型和迁移。...
Ruby on Rails Guides v2 - Ruby on Rails 4.2.5
[Pragmatic Bookshelf] Crafting Rails Applications Expert Practices for Everyday Rails Development (E-Book) ☆ 图书概要:☆ Rails 3 is a huge step forward. You can now easily extend the framework, ...