简体   繁体   English

Rails gem添加文件

[英]Rails gem add file

I want to use paperclip , but it doesn't support CloudFiles. 我想使用回形针 ,但它不支持CloudFiles。 A fork of paperclip adds a cloud_files.rb file to the lib/paperclip/storage directory (this is also where the Amazon S3 file that comes with paperclip is). 回形针的分支将cloud_files.rb 文件添加到lib/paperclip/storage cloud_files.rb lib/paperclip/storage目录(这也是回形针随附的Amazon S3文件所在的位置)。 How would I add this to my rails app? 如何将其添加到我的Rails应用程序中?

And is there anyway to do it without having to clone the repo and use rake install ? 而且有没有要做的事情而不必克隆repo并使用rake install吗?

In this situation, the author of the cloud files fork has actually created a separate gem, paperclip-cloudfiles , so you can just use that Gem instead: 在这种情况下,云文件fork的作者实际上已经创建了一个单独的gem, paperclip-cloudfiles ,因此您可以改用该Gem:

gem 'paperclip-cloudfiles'

However, you can also just point to the git repository instead: 但是,您也可以只指向git存储库:

gem 'paperclip', :git => "git://github.com/minter/paperclip.git"

Then do a bundle install and you should have access to the CloudFiles additions. 然后进行bundle install ,您应该可以访问CloudFiles附加功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM