问题
Trying to install paperclip (the cloudfiles fork), but getting an error:
config/enviroments/development.rb:28:in 'block in <top (required)>': uninitialized constant Paperclip (NameError)
This is how I installed everything.
gemfile:
gem 'cloudfiles', '>=1.4.9'
gem 'paperclip-cloudfiles', '~>2.3'
config/environment.rb
config.gem 'paperclip-cloudfiles', :lib => 'paperclip'
config/enviroments/development.rb
Paperclip.options[:command_path] = "/ImageMagick/6.6.9-Q16/" #ImageMagick is at c:/ImageMagick/..
回答1:
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. Maybe instead you should do:
gem 'paperclip-cloudfiles', '~>2.3', :require => 'paperclip'
回答2:
In your gemfile you could try:
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
来源:https://stackoverflow.com/questions/6062970/paperclip-error-uninitialized-constant-paperclip-nameerror