Ruby on Vista

泄露秘密 提交于 2019-12-08 19:55:19

问题


I installed Ruby and Ruby on Rails yesterday on Vista 32bit using the directions on this site: http://rubyonrails.org/down

so I downloaded the installer, then Gems, then I downloaded rails with Gems.

now I can't use the Gem or Ruby commands in the command line... so I assume there's something wrong with the environment variables, but I hav eno idea how to set them up in Vista or what to put. Can anyone help me with this?


回答1:


To set up the environment variables, do this

  1. Fire up the start menu
  2. Right-Click on Computer and select Properties
  3. Click Advanced system settings in the left-hand bar, and confirm the UAC prompt
  4. Select the Advanced tab (it's 3rd)
  5. Click Environment Variables... (at the bottom)
  6. In the top box (User variables for XXX) either find the entry for PATH, or click new to create the entry.
    If there is already a PATH use semi-colons to seperate each directory listed in it
  7. Put c:\ruby\bin (change if you installed ruby somewhere else) in.
  8. Click OK a lot of times to close all the windows we opened.
  9. Restart your command prompt.

gem and ruby and irb should now all work. Whoever said that GUI tools are slower than command line tools. pshaw!




回答2:


In the command line window type 'PATH' then hit return, do you see ruby.exe on the PATH environment variable?

If you installed ruby to say 'c:\ruby' then it'll be 'c:\ruby\bin\'.

Looks like it may be missing from the path.




回答3:


Add your ruby bin directory to your PATH environment variable, go to Control Panel -> System -> Advanced system settings, then go to the Advanced tab, Environment Variables, then edit your PATH variable and append the path to the ruby binaries install i.e. ;C:\ruby\bin



来源:https://stackoverflow.com/questions/181038/ruby-on-vista

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