windows下ruby安装环境配置
来源:互联网 发布:淘宝详情页 太模糊 编辑:程序博客网 时间:2024/06/05 23:37
Ruby 安装
从源代码在windows下安装Ruby是非常苦逼的差事,可以从http://rubyinstaller.org/
或者 http://railsinstaller.org/ 下载已经打包好的安装程序。
Ruby配置
- 在windows中配置环境变量
RUBY_HOME=rubyinstaller_dir (实际的ruby所在路径)
在path中添加 %RUBY_HOME%\bin
- 在命令行下运行 ruby --version,如果显示ruby版本信息说明安装正常。
devkit安装
- 下载devkit
如果使用rubyinstaller安装包需单独下载devkit,下载路径为 DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe 。该文件是7zip压缩包。
解压缩下载的文件到合适的路径,如F:\Software\develop\DevKit-mingw64-64-4.7.2-20130224-1432-sfx
命令行下进入devkit目录,运行 ruby dk.rb init, 运行完后会生成一个 config.yml文件
打开config.yml文件,加入ruby所在路径,如
# 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
注意保持上面的格式。
5. 命令行下进入devkit目录,运行 ruby dk.rb install
至此ruby运行环境配置好了。在命令行下面可以像在linux下一样安装bundle和其他gem。
rmagick安装问题
在安装rmagick的时候会提示“无效的格式”等等错误,这是因为缺少ImageMagick的原因。可以用以下方式解决:
- 下载ImageMagick的windows安装包
ImageMagick windows安装包
- 安装ImageMagick
注意两个安装选择项一定要勾上,并且安装路径不要有空格,如program files (微软这个默认路径害死多少人?):
Add application direcotry to your system path
Install development headers and libraries for C and C++
- 命令行下运行 gem install rmagick --platform=ruby -- --with-opt-dir= ImageMagick_dir (换成自己的目录)
- windows下ruby安装环境配置
- windows环境下ruby的安装
- 主题:在windows下配置Ruby开发环境
- Windows下配置Ruby on Rails开发环境
- Windows 下配置ruby on rails环境
- 在windows 7上安装配置ruby on rails环境
- windows下安装ruby on rails 环境搭建
- ruby在windows环境下下载安装devkit
- windows下安装ruby on rails 环境搭建·
- [环境搭建]Windows下安装Ruby和Jekyll
- [环境搭建]Windows下安装Ruby和Jekyll
- Windows环境下开发Ruby
- Ubuntu 环境下配置安装Ruby on Rails
- linux下安装配置ruby on rails环境
- Windows下ruby的pry安装和配置
- Ubuntu下配置ruby环境
- Ruby系列文章之2 --- Windows下安装Ruby on Rails 开发环境
- Mac 下安装Ruby环境
- AJAX 教程
- 两个队列实现栈(stack)
- Android系统system用户权限和root权限的获取
- OpenCV Mat结构关键特性记录
- 简单网络请求+ListView
- windows下ruby安装环境配置
- Windows 下安装 express
- Win API 和 MFC 创建的线程中实现设置定时器
- struts2_day02_05-获取表单数据(使用ActionContext获取)
- 1、编写一个Java程序在屏幕上输出“你好!”。
- Android 开发的17个建议,紧跟Google官方,进阶必看!
- ROS launch文档介绍
- Excel真是太神奇了
- 前端开发者不得不知的 ECMAScript 6 十大特性