{"id":130,"date":"2008-08-24T21:06:27","date_gmt":"2008-08-25T05:06:27","guid":{"rendered":"http:\/\/www.antunkarlovac.com\/blog\/?p=130"},"modified":"2008-08-24T21:06:27","modified_gmt":"2008-08-25T05:06:27","slug":"installing-rmagick-on-cygwin","status":"publish","type":"post","link":"https:\/\/www.antunkarlovac.com\/blog\/2008\/08\/24\/installing-rmagick-on-cygwin\/","title":{"rendered":"Installing RMagick on Cygwin"},"content":{"rendered":"<p><a href=\"http:\/\/rmagick.rubyforge.org\/\" target=\"_blank\">RMagick<\/a> is a Ruby to <a href=\"http:\/\/www.imagemagick.org\/script\/index.php\" target=\"_blank\">ImageMagick<\/a> framework that&#8217;s needed if you want to edit images using Rails. <a href=\"http:\/\/www.kanthak.net\/opensource\/file_column\/\" target=\"_blank\">FileColumn<\/a>, a Rails plugin for handling file uploads, plugs into RMagick very smoothly. While FileColumn is really simple to use, installing RMagick on Cygwin seemed really <a href=\"http:\/\/rmagick.rubyforge.org\/install-faq.html\" target=\"_blank\">daunting<\/a>. There were a bunch of warnings on how it differs from a usual Rails plugin install. So I&#8217;m summarizing my experience here:<\/p>\n<ol>\n<li>First install ImageMagick for Cygwin. Do this by updating Cygwin itself, using the Cygwin setup program. It&#8217;s the same approach as you use for installing Cygwin the first time around. When you get to the Select Packages page, find the ImageMagick packages under the Graphics node and make sure they&#8217;re set to be installed. Look for libImageMagick1; there are a few others.<\/li>\n<li>Run <strong>gem update &#8211;system<\/strong><\/li>\n<li><a href=\"http:\/\/rubyforge.org\/projects\/rmagick\/\" target=\"_blank\">Download the RMagick gem for Linux<\/a>. Not the Win32 one. That&#8217;s the one called &#8220;rmagick&#8221;. You have to download it; you can&#8217;t install it remotely.<\/li>\n<li>From the directory where you downloaded the RMagick gem, run <strong>gem install rmagick &#8211;local<\/strong><\/li>\n<li>Rebase Cygwin. I&#8217;ve never had to do this before, but I got a bunch of errors in the Ruby server output console saying the following when RMagick was used:<br \/>\nunable to remap C:\\cygwin\\usr\\X11R6\\bin\\cygXext-6.dll to same address ruby died waiting for dll loading, errno 11<br \/>\nTo rebase Cygwin, close all your Cygwin shells, and open an ash shell by going to <strong>Start&gt;Run&#8230;<\/strong>, then enter <strong>C:\\cygwin\\bin\\ash.exe<\/strong> in the Run dialog and click OK. Run <strong>\/bin\/rebaseall<\/strong> from the ash console.<\/li>\n<\/ol>\n<p>Then restart the Rails server from script.<\/p>\n<p>For reference, I used RMagick 2.5.2, with Ruby 1.8.2 and Rails 2.1.0.<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>RMagick is a Ruby to ImageMagick framework that&#8217;s needed if you want to edit images using Rails. FileColumn, a Rails plugin for handling file uploads, plugs into RMagick very smoothly. While FileColumn is really simple to use, installing RMagick on Cygwin seemed really daunting. There were a bunch of warnings on how it differs from &hellip; <a href=\"https:\/\/www.antunkarlovac.com\/blog\/2008\/08\/24\/installing-rmagick-on-cygwin\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Installing RMagick on Cygwin<\/span><\/a><!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/posts\/130"}],"collection":[{"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/comments?post=130"}],"version-history":[{"count":1,"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/posts\/130\/revisions"}],"predecessor-version":[{"id":131,"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/posts\/130\/revisions\/131"}],"wp:attachment":[{"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/media?parent=130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/categories?post=130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.antunkarlovac.com\/blog\/wp-json\/wp\/v2\/tags?post=130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}