问题描述
我正在 Windows 7 上安装 Ruby on Rails.我安装了 ruby-1.9.2(在 c:\ruby 中)并且我已经使用 gem install rails
命令安装了 rails(从 c:\ruby\bin 执行此操作,因为这是我可以调用命令的唯一位置).然后我运行了 rails new my_app
命令.
I am in the process of installing Ruby on Rails on windows 7. I installed ruby-1.9.2 (in c:\ruby) and I've installed rails using the gem install rails
command (doing this from c:\ruby\bin since this is the only place i can call the command). I've then run rails new my_app
command.
我遇到的问题是尝试从 apps 文件夹 (c:\ruby\bin\my_app) 内运行 rails server
命令我收到消息:'rails' is无法识别...
.
The problem that I have is trying to run the rails server
command from inside the apps folder (c:\ruby\bin\my_app) I get the message: 'rails' is not recognized...
.
我做错了什么?
推荐答案
在 Windows 上,您需要设置系统 PATH 变量(我的电脑 -> 属性 -> 高级 -> 环境变量 -> 系统变量)
On Windows you need to set your system PATH variable (My Computer -> Properties -> Advanced -> Environment Variables -> System variables)
附加PATH变量值:: c:\ruby\bin;
Append the PATH Variable value:: c:\ruby\bin;
这篇关于在 Windows 上安装 Ruby on Rails的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!