0

我试图在 Windows 7 上使用 Devkit 安装 Rails

我已经安装了 railsinstaller

我在 config.yml 中添加了 Ruby2.1.0 的路径:

# 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
#
---
- C:/RailsInstaller/Ruby2.1.0

当我尝试跑步时

ruby dk.rb install

它给了我以下信息:

[INFO] 跳过 'C:/RailsInstaller/Ruby2.1.0' 的现有 gem 覆盖
[WARN] 跳过 'C:/RailsInstaller/Ruby2.1.0' 的现有 DevKit 帮助程序库

当我尝试使用强制选项时:

ruby dk.rb install --force

我明白了:

[警告] 更新(带备份)现有 gem 覆盖 'C:/RailsInstaller/Ruby2 .1.0' [警告] 更新(带备份)'C:/RailsInstaller/Ruby2 .1.0' 的 DevKit 帮助程序库

4

1 回答 1

1

我已经类似地回答了其他堆栈溢出问题。像这儿:

警告被视为导轨中的错误

但我诚实的建议是将您的 Rails 开发扼杀在萌芽状态,并开始在 OSX 或 Linux 上进行开发。你会很感激你这样做了。Ruby 本质上是非常自然的 linuxy,摆脱 Windows 环境将帮助您省去很多心痛和头痛。

我推荐在 Windows 上使用 Vagrant 虚拟机进行 Ruby 开发。Vagrant 运行 linux ubuntu 并允许您在本地计算机和虚拟机之间同步文件夹。文档和说明在这里:

http://docs.vagrantup.com/v2/getting-started/index.html

当然,如果您可以使用 Mac,OSX 预装了 Ruby,因此只需几分钟即可让您的 Rails 环境准备就绪。如果你不这样做,Vagrant 是一个很好的运行虚拟机。

于 2015-05-11T15:33:04.823 回答