简体   繁体   English

回形针错误:未初始化的常量Paperclip(NameError)

[英]Paperclip Error: uninitialized constant Paperclip (NameError)

Trying to install paperclip (the cloudfiles fork), but getting an error: 试图安装paperclip(cloudfiles fork),但收到错误:

 config/enviroments/development.rb:28:in 'block in <top (required)>': uninitialized constant Paperclip (NameError)

This is how I installed everything. 这就是我安装一切的方式。

gemfile: 的Gemfile:

gem 'cloudfiles', '>=1.4.9'
gem 'paperclip-cloudfiles', '~>2.3'

config/environment.rb 到config / environment.rb

config.gem 'paperclip-cloudfiles', :lib => 'paperclip'

config/enviroments/development.rb 配置/ enviroments / development.rb

Paperclip.options[:command_path] = "/ImageMagick/6.6.9-Q16/" #ImageMagick is at c:/ImageMagick/..

I'm not sure if this will solve your problem, but if you're using Bundler, you don't need to call config.gem in your environment.rb. 我不确定这是否能解决您的问题,但如果您使用的是Bundler,则无需在environment.rb中调用config.gem。 Maybe instead you should do: 也许你应该这样做:

gem 'paperclip-cloudfiles', '~>2.3', :require => 'paperclip'

In your gemfile you could try: 在您的gemfile中,您可以尝试:

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

As Jack Chu stated you shouldn't need to list the gem in your environment.rb 正如Jack Chu所说,你不需要在你的环境中列出gem .rb

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

相关问题 使用Unicorn进行生产中的回形针:未初始化的常量回形针(NameError) - Paperclip in Production with Unicorn: uninitialized constant Paperclip (NameError) 未初始化的常量Paperclip :: paperclip-ffmpeg错误 - uninitialized constant Paperclip::Error with paperclip-ffmpeg 未初始化的常量Paperclip :: Cropper - uninitialized constant Paperclip::Cropper 未初始化的常数Mongoid :: Paperclip - uninitialized constant Mongoid::Paperclip Heroku上的Rails 4中的回形针NameError(未初始化的常量AWS :: S3 :: Errors) - Paperclip NameError (uninitialized constant AWS::S3::Errors) in Rails 4 on heroku NameError(未初始化的常量Paperclip :: Storage :: S3 :: AWS): - NameError (uninitialized constant Paperclip::Storage::S3::AWS): Paperclip aws-sdk错误:未初始化的常量 - Paperclip aws-sdk error: uninitialized constant Paperclip,未初始化的常量Paperclip :: Storage :: Fog :: Excon - Paperclip, uninitialized constant Paperclip::Storage::Fog::Excon Rails回形针水印“未初始化的常量回形针” - Rails paperclip watermark “uninitialized constant Paperclip” Rails Paperclip和AWS s3集成错误“未初始化的常量Paperclip :: Storage :: S3 :: Aws” - Rails Paperclip and aws s3 integration error “uninitialized constant Paperclip::Storage::S3::Aws”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM