Install RMagic in Ubuntu7.10

Source: Internet
Author: User
File-column is a convenient plug-in used by the ROR application to process uploaded images. to crop images, you must install RMagic. Before installing RMagic, you must install ImageMagick or GraphicsMagic. After RMagic is installed, you can specify the image size as follows: file_column: image,: magick = & gt ;{: geometry = & gt; "100x100,

File-column is a convenient plug-in used by the ROR application to process uploaded images. to crop images, you must install RMagic. Before installing RMagic, you must install ImageMagick or GraphicsMagic.

After RMagic is installed, you can specify the image size using the following method:

File_column: image,: magick =>{: geometry => "100x100 "}

In this way, no matter how large the image is uploaded, it will be scaled up or down to X.

You can also generate a thumbnail using the following methods:

File_column: image,: magick =>{: versions =>{: thumb => "75x75 "}}

In this way, when you upload an image, you will also generate a thumbnail of 75x75.

RMagic Installation notes in Ubuntu 7.10:

$ Sudo apt-get install imagemagick

$ Sudo gem install rmagick -- include-dependencies

The error "configure: error: Can't install RMagick. Can't find Magick-config or GraphicsMagick-config program." appears. Follow the prompts to install the following package:

$ Sudo apt-get install libmagick9-dev

Install gem again:

$ Sudo gem install rmagick -- include-dependencies

Restart the Rails service. RMagic is installed successfully.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.