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