Windows – Multiple ruby version

Needed to have mutliple version of ruby on my dev machine and I found Uru

Here is just a quick post-it of the main commands (suppose Uru is arleady installed)

Add a new ruby version

uru admin add C:\path\to\ruby\bin

List existing versions

uru ls

Switch to another version

uru 230p0

to switch to the version 2.3.0 of ruby

Ruby – Install Rails (4.2.4) on Windows

First, I installed Ruby 2.2 but I had many problems using rails with this version.

Working version

  • Install Ruby version 2.0
  • Install DevKit and add it to the PATH
  • cd it
  • ruby dk.rb init
  • ruby dk.rb install
  • gem install rails
  • rails new FirstApp
  • cd FirstApp
  • rails server

Bouyah ♥

Works this time! Thanks to Ruby 2.0

Doesn’t work 😥

  • Install Ruby version 2.2.3
  • Install DevKit and add it to the PATH
  • gem install rails
  • Download nokogiri v1.6.6.2 x86 (because of the issue that says  cannot load such file — nokogiri/nokogiri (LoadError))
  • gem uninstall nokogiri
  • gem install --local C:\Users\$user$\Downloads\nokogiri-
  • Modify the file C:\Ruby22\lib\ruby\gems\2.1.0\specifications\sqlite3-1.3.7.gemspec
    • Replace
    • by
      s.require_paths= ["lib/sqlite3_native"]
  • rails new FirstApp
  • cd FirstApp
  • rails server

Why do we have to do so many things ?

  • Because nokogiri is not currently working with version 2.2 of ruby
  • Because of the message
    cannot load such file -- sqlite3/sqlite3_native

Enjoy ♥