[英]Installing Ruby on Rails on windows
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). 我正在Windows 7上安装Ruby on Rails。我安装了ruby-1.9.2(在c:\\ ruby中)并且我使用
gem install rails
命令gem install rails
(从c:\\ ruby \\ bin执行此操作)因为这是我可以调用命令的唯一地方)。 I've then run rails new my_app
command. 然后我运行
rails new my_app
命令。
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...
. 我遇到的问题是尝试从apps文件夹中运行
rails server
命令(c:\\ ruby \\ bin \\ my_app)我收到消息: 'rails' is not recognized...
What have I done wrong? 我做错了什么?
On Windows you need to set your system PATH variable (My Computer -> Properties -> Advanced -> Environment Variables -> System variables) 在Windows上,您需要设置系统PATH变量(我的电脑 - >属性 - >高级 - >环境变量 - >系统变量)
Append the PATH Variable value:: c:\\ruby\\bin; 附加PATH变量值:: c:\\ ruby \\ bin;
I'm a windows 7 user, and I was able to get rails working by following this guide: http://www.wiki.devchix.com/index.php?title=Windows_-_Rails_3 I know linking is frowned upon, but the windows 7 installations is quite detailed, and the devchix guide is excellent. 我是一个Windows 7用户,我可以通过以下指南获得rails工作: http : //www.wiki.devchix.com/index.php? title = Windows_-_ Rails_3我知道链接是不赞成的,但是Windows 7安装非常详细,devchix指南非常好。 I store my apps on the desktop in a folder called 'rails' not in the ruby bin.
我将我的应用程序存储在桌面上名为“rails”的文件夹中,而不是在ruby bin中。
Try Rails For The Windows installer. 尝试使用Windows安装程序的Rails 。 It allows you install Ruby and Rails on Windows in a very simple way.
它允许您以非常简单的方式在Windows上安装Ruby和Rails。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.