Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I execute Ruby scripts and irb from Windows7 Powershell?

Tags:

windows

ruby

I used the Windows Ruby Installer, and all I can do is run ruby from the normal command line with a bundled shortcut named "Command line with ruby".

Windows 7 Powershell is not bad as a replacement for bash, so I would like to be able to execute Ruby, irb, gem etc from it. At the very least executing scripts...

I've read that this is possible, how?

like image 302
agente_secreto Avatar asked Jul 19 '11 16:07

agente_secreto


1 Answers

Is the directory that Windows Ruby Installer installed to (like C:\Ruby192\bin) on your path? I can't recall if it should add that automatically on install but I've not had any issues running irb or scripts from powershell. You can check if it's on your path by running the following from a powershell session:

$env:path
like image 154
Will Gorman Avatar answered Sep 28 '22 06:09

Will Gorman