Installing Ruby on Rails on windows

五迷三道 提交于 2019-12-19 04:09:42

问题


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.

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....

What have I done wrong?


回答1:


On Windows you need to set your system PATH variable (My Computer -> Properties -> Advanced -> Environment Variables -> System variables)

Append the PATH Variable value:: c:\ruby\bin;




回答2:


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. I store my apps on the desktop in a folder called 'rails' not in the ruby bin.




回答3:


Try Rails For The Windows installer. It allows you install Ruby and Rails on Windows in a very simple way.



来源:https://stackoverflow.com/questions/4853222/installing-ruby-on-rails-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!