-1

I am successfully running my Ruby on Rails 3.0.9 application in production mode on a Linode VPS. The only problem that I have is related to the Paperclip gem: it works in development mode on my local machine (this has Mac Os, Snow Leopard) but it doesn't work on the remote machine in production mode (this has Ubuntu 10.04 LTS).

I made some research on the net and I tried to solve that problem following this solution:

On your production server, try running:

which identify

...

If it returns something like "/usr/bin/identify", then you'll want to set the Paperclip options in your production.rb environment file to:

Paperclip.options[:command_path] = "/usr/bin"

Since I get the /usr/bin/identify, in my environment files I have the following scenario:

# `config/environments/development.rb`
Paperclip.options[:command_path] = "/usr/local/bin"

# `config/environments/production.rb`
Paperclip.options[:command_path] = "/usr/bin"

Anyway in production mode Paperclip doesn't work. In development it works.

How can I solve the problem?


Following are some output:

>> $ <project_name> bundle show paperclip
=> /usr/local/lib/ruby/gems/1.9.1/gems/paperclip-2.3.16
Community
  • 1
  • 1
Backo
  • 18,291
  • 27
  • 103
  • 170
  • What specifically do you mean by "doesn't work?" – cam Aug 01 '11 at 22:43
  • paperclip should generate logs when calling identify / convert, do you see any? – Aaron Qian Aug 02 '11 at 01:31
  • @cam - The error that I am getting is 'Paperclip::CommandNotFoundError: Could not run the `identify` command. Please install ImageMagick.', but I installed ImageMagick! Probabily RoR doesn't "fill" it... how can I check that? – Backo Aug 02 '11 at 07:37

1 Answers1

0

Have you determined if ImageMagick is installed with which convert? That requirement is discussed here.

Note: the question was edited after this answer was posted. I cannot delete this answer as it has been accepted.

Cymen
  • 14,079
  • 4
  • 52
  • 72
  • On the remote machine 'which convert' returns me '/usr/bin/convert', so I have to use "/usr/bin" for Paperclip. As I wrote in the question I already set that path on the remote machine. Maybe the problem is elsewhere. – Backo Aug 01 '11 at 21:52
  • Why is my answer accepted and then downvoted if it doesn't solve your problem (not assuming you down voted)? Weirdness.. I'm tempted to delete it. – Cymen Oct 29 '12 at 16:52