在window 7 64位的操作系统下安装ruby环境

下载window下rubyinstaller 的安装包以及对应的devkit的安装包,我这里选择是32位的ruby

下载地址

http://rubyinstaller.org/downloads/

然后双击解压rubyinstaller,一直选择下一步到完成就可以了

我的ruby安装在d盘的一级目录下

D:\Ruby200

同样双击devkit的安装包,也是安装在d盘的一级目录下

D:\devkit

然后在devkit的安装目录下有个config文件,打开直接编辑下ruby的安装路径

# the triple hyphens with the absolute path to the Ruby root directory.
#
# Example:
#
# ---
# - C:/ruby19trunk
# - C:/ruby192dev
#
---
- d:/Ruby200
保存之后,运行window 7的命令终端

C:\Users\wang>ruby dk.rb init

C:\Users\wang>ruby dk.rb install

然后就可以在window下使用ruby和gem 的命令了

 

 

WHICH VERSION TO DOWNLOAD? If you don’t know what version to install and you’re getting started with Ruby, we recommend you use Ruby+Devkit 2.5.X (x64) installer. It provides the biggest number of compatible gems and installs MSYS2-Devkit alongside Ruby, so that gems with C-extensions can be compiled immediately. The 32 bit (x86) version is recommended only if custom 32 bit native DLLs or COM objects have to be used. HOW TO UPDATE? Ruby can be updated to the latest patch version (e.g. from 2.4.1 to 2.4.4) by running the new installer version. Installed gems are not overwritten and will work with the new version without re-installation. It’s sufficient to use the RubyInstaller without Devkit for update installations. The Devkit can be updated separately per ridk install command. If the new Ruby version is from a different stable branch, then please use a new target directory for installation. That is to say a previous RubyInstaller-2.4.x installation should not be updated by installing RubyInstaller-2.5.x into the same directory. This is because gems with C extensions are not compatible between ruby-2.4 and 2.5. Find more in the FAQ. WHICH DEVELOPMENT KIT? Ruby 2.4.0 and newer use the MSYS2 toolchain as development kit. It is bundled into the Ruby+Devkit installer version as a selectable component, so that no additional downloads/installs are required. When using the Ruby without Devkit version, the MSYS2 Devkit can be installed separately by running ridk install. MSYS2 is required to build native C/C++ extensions for Ruby and is necessary for Ruby on Rails. Moreover it allows the download and usage of hundreds of Open Source libraries which Ruby gems can depend on. The MSYS2 development environment can be activated in the running cmd or powershell console by ridk enable. This adds commands like make, gcc, pacman or sh to the search path. See more in the Wiki. SPEED AND CONVENIENCE RubyInstaller is compiled with the latest GCC at the release date. The installed ruby is a native Windows application but combines this with the rich UNIX toolset of MSYS2 and the large repository of MINGW libraries. Find more about RubyInstaller and it’s alternatives here. DOCUMENTATION The Ruby core and standard library documentation is part of the installation. We also recommend the online documentation or HTML version downloadable from ruby-doc.org. SUPPORT Enjoy, happy Ruby coding, and let us know what you think or if you have any issues at our helpful and friendly RubyInstaller Google Group.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值