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 trialJonathan Grieve
Treehouse Moderator 91,253 PointsCloning Compass Extension files
I've been spending a bit of time organising my local workspace for the Compass Extension course.
I was able to follow the video up to the cloning the extension template files to the extension folder.
Remember I use a Windows Ruby interpreter for Sass
When I type this command git clone https://github.com/at-import/Compass-Extension-Template.git
I get this response
*git is not recognised as an internal or external command, operable program or batch file. *
But I do have Git installed on my computer and I believe I'm all setup on Github.
For now I've downloaded the files as a zip file and set it up manually. How do I set up Ruby on Windows to accept git commands?
Thanks. :)
2 Answers
Iain Simmons
Treehouse Moderator 32,305 PointsIs it the 'Start Command Prompt with Ruby' or something like that? Or 'Interactive Ruby'?
I think it's probably the PATH
issue in any case. You could try running the Git installer again if you still have it handy.
Otherwise, do a search for 'how to add git to path in windows' and include your Windows version number at the end.
It should involve adding the folder that the Git executable is in to the PATH
environment variable, which has its items separated by a semicolon.
This variable tells your command prompt which folders to look for executables to run when you type in a command without the path. i.e. when you use the command git
instead of C:\Program Files\Git\bin\git.exe
or similar.
Iain Simmons
Treehouse Moderator 32,305 PointsAre you trying to run the git
command from within irb
? Because you can only run Ruby code in irb
...
Try the git
command in a regular Windows command prompt. Hopefully it added to the PATH
environment variable when Git was installed. Otherwise you might have to re-run the Git installer and make sure it adds it to the PATH
, as described in this answer on StackOverflow to a similar issue.
Jonathan Grieve
Treehouse Moderator 91,253 PointsHi Ian,
I'm not sure what irb is but I use a Ruby command interpreter which is basically an MS-DOS command prompt that's compatable with Ruby but not the regular command prompt.
Jonathan Grieve
Treehouse Moderator 91,253 PointsJonathan Grieve
Treehouse Moderator 91,253 PointsIt is Start Command Prompt with Ruby. At the moment I have 2 versions of Ruby installed if that affects anything!
Since I've just started the CSS to Sass course now might be a good time to delete and start over?
It does seen to be a Git problem though as Gen and Sass commands all work but not git!
Jonathan Grieve
Treehouse Moderator 91,253 PointsJonathan Grieve
Treehouse Moderator 91,253 PointsI'm all set up! :D Thanks for all your help! I was able to add the path to Git to the environment variables and now the clone command works like a charm!
http://blog.countableset.ch/2012/06/07/adding-git-to-windows-7-path/
Iain Simmons
Treehouse Moderator 32,305 PointsIain Simmons
Treehouse Moderator 32,305 PointsExcellent!
Thanks for sharing the article you used to sort it out.