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
- Configuring environment Variables in Windows
- Run Ruby--version on the command line if the Ruby version information is displayed stating that the installation is normal.
Devkit Installation
- 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.
Unzip the downloaded file to the appropriate path, such as F:\Software\develop\DevKit-mingw64-64-4.7.2-20130224-1432-sfx
Enter the Devkit directory under the command line, run Ruby DK.RB init, and generate a config.yml file when finished running
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:
- Download the Windows installation package for ImageMagick
ImageMagick Windows installation Package
- 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?) ):
- 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