I can't install rmagick gem on windows

前端 未结 5 1815
梦如初夏
梦如初夏 2020-12-28 11:35

I used ruby 1.9.2 and rails 3.0.3. iam trying to install rmagick gem but when i run bundle install I got an error tells me:

Installing rmagick          


        
相关标签:
5条回答
  • 2020-12-28 11:52

    I have the same problem, my environment was:

    windows XP (x32)
    ruby 1.9.3p484 (2013-11-22) [i386-mingw32]
    DevKit-tdm-32-4.5.2-20111229-1559-sfx
    ImageMagick-6.8.8-2-Q8-x64-static.exe
    

    I install rmagik gem successfully, after reinstalling of ImageMagick from v6.8.8 to 6.6.7. It was just a problem of incompatibility versions...

    0 讨论(0)
  • 2020-12-28 11:54

    Use rmagick-win32 gem, and it doesn't need ImageMagick separately. This is bundled.

    please have a look: http://rmagick.rubyforge.org/install-faq.html#win

    0 讨论(0)
  • 2020-12-28 11:57

    Prerequisites:
    Ruby > 1.8.6
    DevKit (any version)
    No other ImageMagick installation or PATH entry

    Step 1: Installing ImageMagick:

    Download ImageMagick: http://imagemagick.spd.co.il/binaries/ImageMagick-6.8.0-3-Q16-windows-dll.exe

    Install ImageMagick:
    *Important: The installation path should NOT contain any spaces.
    Ideally select “C:\ImageMagick″

    Please make sure to select the below options:

    Add application directory to your path system
    Install development headers and libraries for C and C++

    Step 2: Installing rmagick:

    Use the following command to install rmagick gem:

    gem install rmagick --platform=ruby -- --with-opt-lib=c:/ImageMagick/lib --with-opt-include=c:/ImageMagick/include
    

    via-

    http://shoobm.wordpress.com/2013/01/03/installing-rmagick-gem-on-windows-7/

    0 讨论(0)
  • 2020-12-28 12:00

    First of all clear your path environment variables. (This is the main step that people often skip, but very important). This is the main reason for the error you're facing.

    Then install the rails installer (2.0.0) from here : http://railsinstaller.org/en

    It'll set up ruby, rails, and everything else you need. This will also set up your environment path variables for you as well.

    Next install imagemagick 6.7.9.9 or lower and while installing check the option to include C headers. Make sure you install it within the rails installer folder.

    Then type this in your command prompt path=c:\RailsInstaller\ImageMagick-6.7.9-Q8;%path% or whatever version you have.

    Then type

    gem install rmagick -- '--with-opt-dir="c:\RailsInstaller\ImageMagick-6.7.9-Q8"'
    

    Finally edit C:\RailsInstaller\Ruby2.0.0\setup_environment.bat to include the path to ImageMagic

    At line 25: SET PATH=c:\RailsInstaller\ImageMagick-6.7.9-Q8; or whatever version you have

    0 讨论(0)
  • 2020-12-28 12:12

    Please refer to this thread in RubyInstaller group that points to our Tutorials page where you can find this blog post describing the installation method.

    0 讨论(0)
提交回复
热议问题