Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Installing a Ruby Development Environment Installing a Ruby Development Environment Installing Ruby on Windows

(Installing Ruby on Windows)

in command prompt using the command line ruby dk.rb it give me a error error is ['ruby' is not recognized as an internal or external command, operable program or batch file.]

2 Answers

Make sure that your Environment variables have been set. Right click on computer -> Properties -> Advanced System settings -> Environment variables then edit 'PATH' and add C:\Ruby200-x64 to the end of the line. (;C:\Ruby200-x64 <- this is where I have ruby installed to.)

Help this helps.

Edit: Then exit cmd and reopen it.

Edouard Winia
Edouard Winia
3,257 Points

Worked for me right now, I had Ruby v 2.1.5 installed but not recognized by my shell. As you said, added the path to my ruby bin directory and it worked. Thx ! E.

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Did you install the full Ruby Installer successfully? Remember that Windows is not a good choice for Ruby and Rails development and in the future you might want to move to a virtual machine with linux (for example free VMWare Player with Ubuntu or Mint). This way you will also practice some console skills.

yeah i installed but i have window OS

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

OK, then try restarting rour computer, run the terminal (preferably cmder or git bash) again and see if it works.

okk i will