If you’re a web developer who’s always been curious about Ruby and RoR but didn’t know where to start (especially because you have a Windows background) this hopefully gets you started.
To check if Ruby installed correctly, open the Run dialog box (Windows Key + R) and type
powershell. In the PowerShell window type in the command
ruby -v. If everything went well you should see a message like
ruby 1.9.3p448 (2013-06-27) [i386-mingw32].
PS > ruby -v ruby 1.9.3p448 (2013-06-27) [i386-mingw32]
Next install the Development Kit. Download the right DevKit for your version of Ruby. For version 1.9.3-p448 that’s tdm-32-4.5.2. Extract it to a folder of your choice (e.g.
D:\App\DevKit) and change to that directory
Run the installation scripts by typing the command
ruby dk.rb init to generate the
config.yml. After that run the command
ruby dk.rb install to bind the DevKit to your Ruby installation.
PS > cd D:\App\DevKit PS D:\App\DevKit> ruby dk.rb init PS D:\App\DevKit> ruby dk.rb install
Finally check that your Ruby environment is using the DevKit correctly by running
gem install json --platform=ruby. This command will install the RubyGems library JSON, or gem like the Ruby folks call it.
After JSON installed correctly run
ruby -rubygems -e "require 'json'; puts JSON.load('').inspect" to confirm that the JSON gem is working. This should show you the answer to life, the universe, and everything.
PS > gem install json --platform=ruby PS > ruby -rubygems -e "require 'json'; puts JSON.load('').inspect" PS >