Wednesday, May 8, 2013

Installing Ruby on Rails - DevKit and JSON - RubyGems override

After some time I went and installed again Ruby and Ruby on Rails. You can find the installers on the official website here for Ruby and DevKit, and for Ruby on Rails, the installers are here.

General Steps to install Ruby DevKit

  1. Extract downloaded DevKit to a folder inside the main Ruby folder
  2. Go inside the extracted DevKit folder
  3. ruby dk.rb init
  4. ruby dk.rb review
  5. ruby dk.rb install

To install JSON

 gem install json -v '1.7.7'

To install DevKit - This will also write over any previous config and omit any warnings


ruby dk.rb install --force

These solve the error messages I received while trying to install everything on Windows:


ERROR:  Error installing json:
ERROR: Failed to build gem native extension.

An error occurred while installing json (1.7.7), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.7'` succeeds before bundling.


ruby dk.rb install
[INFO] RubyGems override already in place for <ruby_path>, skipping.
[WARN] DevKit helper library already exists for <ruby_path>, skipping.