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

i am having an issue installing the ruby devkit

i get this error when i type ruby dk.rb but i run ruby files in my computer i don't understand why it doesn''t work in the devKit file

$ ruby dk.rb init sh.exe": ruby: command not found

1 Answer

Garrett Carver
Garrett Carver
14,681 Points

This means that it doesn't know where to look for ruby.exe when you use the command 'ruby'. Here's how you fix this.

  1. First, verify the correct ruby folder was appended to your path:
    On windows 7, Right click 'Computer' on the start menu. Then click Properties>Advanced system settings>Environment Variables. Then under 'system variables' go to where it says Path and double click. The correct ruby install folder should be appended to the variable value. (in my case: ;C:\Ruby22-x64\bin). If it isn't in there, try reinstalling ruby as an administrator. Right click the installer to do this.

  2. If it was added to your path, then just try restarting your computer. This should update the path currently in use so your command ruby will work.