10

I am using Git Bash on Windows Vista Business. I am trying to install Redmine. Basically on step 4, I need to get RubyGem installed before I install the bundler as part of the dependency install (http://www.redmine.org/projects/redmine/wiki/RedmineInstall). I downloaded rubygems-2.2.2.zip from https://rubygems.org/pages/download. Then I unzipped the file a folder on my desktop.

In Git Bash, I typed ruby setup.rb, I get sh.exe: ruby: command not found. Is it something related to the PATH environment? If so, how do I include it so that Git Bash will see the setup file and run it?

Ruby 1.9.3- p545 is already installed.

Thanks in advance.

Alice Chiu
  • 123
  • 1
  • 3
  • 10
  • http://stackoverflow.com/a/3426805/6309 could help. – VonC May 17 '14 at 16:25
  • Before you do anything you need to install the Ruby language itself. You didn't say if you had done that or not. If you didn't then you should, and/or edit your question to clarify what you have installed. – Casper May 17 '14 at 17:52
  • possible duplicate of [Ruby error after installing heroku toolbelt](http://stackoverflow.com/questions/18770114/ruby-error-after-installing-heroku-toolbelt) – Joe May 18 '14 at 07:08

1 Answers1

15

If you already installed ruby, you have to include correct path.

Right click My Computer, click Properties, go to Advanced System Settings left navigation, click on Environment Variables... button, go to System Variables below, select Path, click Edit and in the beginning of the path enter: C:\Ruby200\bin; (Please note that in here you should indicate the ruby executable path. In case you installed ruby using Ruby installer for windows then the above mentioned path is correct).

joedragons
  • 2,505
  • 21
  • 21
Maxo
  • 528
  • 4
  • 13
  • For some reason this isn't working for me. I installed ruby, my path has `C:\Ruby21-x64\bin;` added to the beginning. I've restarted the shell. Still getting ruby: command not found. Any ideas? – gin93r Oct 06 '14 at 15:50
  • 3
    Ok I got it. Apparently running it from a shortcut holds onto the old PATH variables - until machine restart. Launching git-bash from the start menu worked fine. – gin93r Oct 06 '14 at 18:33