You certainly can, although this is unusual due to Ruby's proximity to web programming. Ruby is a cross-platform language, so if you are writing code, there is a 99% chance that it will work anywhere where you can install the ruby interpreter.
Win32 API, . , Ruby WxWidgets, Qt GTK; .
, - Ruby , Ruby, .
, JRuby Ruby, JVM; , , Java.