Windows under the Ruby installation environment configuration

Source: Internet
Author: User
Tags imagemagick

Ruby Installation

Installing Ruby from source code under Windows is a very hard errand that can be http://rubyinstaller.org/from the

or http://railsinstaller.org/ download the packaged installer.

Ruby Configuration
    1. Configuring environment Variables in Windows
    • Ruby_home=rubyinstaller_dir (where the actual ruby path is)

    • Add%ruby_home%\bin in Path

    1. Run Ruby--version on the command line if the Ruby version information is displayed stating that the installation is normal.
Devkit Installation
    1. Download Devkit

If you use the Rubyinstaller installation package to download DevKit separately, the download path is devkit-mingw64-64-4.7.2-20130224-1432-sfx.exe . The file is a 7zip compressed package.

    1. Unzip the downloaded file to the appropriate path, such as F:\Software\develop\DevKit-mingw64-64-4.7.2-20130224-1432-sfx

    2. Enter the Devkit directory under the command line, run Ruby DK.RB init, and generate a config.yml file when finished running

    3. Open the Config.yml file and add the path to Ruby, such as

# This configuration file contains the absolute path locations of all# installed Rubies to be enhanced to work with the DevKit. This config# file is generated by the ‘ruby dk.rb init‘ step and may be modified# before running the ‘ruby dk.rb install‘ step. To include any installed# Rubies that were not automagically discovered, simply add a line below# the triple hyphens with the absolute path to the Ruby root directory.## Example:## ---# - C:/ruby19trunk# - C:/ruby192dev#---- E:\Ruby21-x64

Note Keep the above formatting.

At this point the Ruby Runtime environment is well configured. Under the command line, you can install bundles and other gems as you would under Linux.

Rmagick Installation Issues

When installing Rmagick, you will be prompted with "invalid format" and so on, which is due to the lack of imagemagick. can be resolved in the following ways:

    1. Download the Windows installation package for ImageMagick

ImageMagick Windows installation Package

    1. Installing ImageMagick

Note Two installation options must be checked, and the installation path does not have spaces, such as program files (Microsoft This default path kills how many people?) ):

    • ADD application Direcotry to your system path

    • Install development headers and libraries for C and C + +

    1. Command line run gem install Rmagick--platform=ruby----with-opt-dir= imagemagick_dir (change to your own directory)

Windows under the Ruby installation environment configuration

Related Article

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.