Reputation: 18831
What is the correct line of code that I should add to insure that my paperclip and imagemagick are properly linked from the enviroment.rb on a side note are there any common caveats I should be mindful of when deploying paperclip/imagemagick on vps (imagemagick on vps is install and same path)
Ok I'm very new to Rails, ubuntu and I'm trying to install paperclip. It askes that I add the pathing in my config/enviorment.rb file so that paperclip can link to imagemagick. link to that reference
To ensure that it does, on your command line, run which convert (one of the ImageMagick utilities). This will give you the path where that utility is installed. For example, it might return /usr/local/bin/convert.
Then, in your environment config file, let Paperclip know to look there by adding that directory to its path.
running this command yields:
/usr/bin/convert
link to old video this old video of installing paperclip just adds to the config/enviorment.rb
config.gem 'paperclip'
Upvotes: 1
Views: 1014
Reputation: 207
In config/environments/development.rb add the following line:
Paperclip.options[:command_path] = "/usr/bin/"
This points to the parent directory of the convert application, because you want to access all paperclip commands, not just convert.
You will need to repeat the above steps for production.rb and test.rb if you need to run those environments as well (assuming you run them all on the same machine, with the same command path).
Upvotes: 1