Reputation: 55293
I never used ruby before, I just wanted to play around with HAML and SASS. I downloaded and installed Ruby's Windows installer (v1.9.1). Then, I clicked ruby.exe
(the icon with a black window and a multicolored gem in the picture). Finally, I typed gem install haml
and pressed Enter
. But nothing happened. Am I doing something wrong?
Reference picture:
alt text http://img707.imageshack.us/img707/9863/haml.png
Upvotes: 3
Views: 5372
Reputation: 941
this is how i installed ruby and sass on my windows machine: How to install ruby and sass on windows?
Upvotes: 0
Reputation: 2063
The latest build (rubyinstaller-1.9.2-p136.exe) had a problem. Rename the folder: c:\ruby192\lib\ruby\site_ruby or delete it altogether and this fixes "gem"
You can do "gem install compass" or if you're behind a proxy you might need to do. gem install –http-proxy compass
Here's a blog post with all the details: http://francisshanahan.com/index.php/2011/how-to-theme-sencha-touch-sass-windows/
Hope that helps, -fs
Upvotes: 0
Reputation: 10378
Installing Ruby using RubyInstaller, you get an shortcut in the Programs menu that let you open a command prompt with Ruby in the PATH
You use that in case you didn't select the option to add Ruby to the PATH.
Either case, the gem command you typed in should be entered at the command prompt, and not inside Ruby itself.
Upvotes: 0
Reputation: 369556
ruby.exe
is the Ruby interpreter. If you want to type code into it, you obviously need to type Ruby code into it, not DOS command code.
The gem
command is a DOS batch file (gem.bat
). DOS batch files need to be run from the DOS command interpreter.
Upvotes: 6
Reputation: 1401
You might need to put the path to Ruby into the PATH environment variable to do this, but this is how I do it:
I open up the command line utility. I then type ruby -S gem install <whatever>
. This works like a charm.
I tried running Ruby and it shows a blank screen but lets me type code. When I press CTRL + C to cancel it then executes my code as well. Maybe you need to do that in the manner you are trying to right now. I just find it easier to just ruby -S <statement>
instead. IronRuby gives me the REPL no problems though.
Upvotes: 7