Ruby -ri doesn’t know anything by default

I installed a new version of Ruby and the documentation was not populated.

Thanks to this answer

Go in your Ruby root folder and run

rdoc --all --ri

It generates all the documentation for evey .rb file under the current folder.

 

Advertisements

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-1.6.6.2-x86-mingw32.gem
  • Modify the file C:\Ruby22\lib\ruby\gems\2.1.0\specifications\sqlite3-1.3.7.gemspec
    • Replace
      s.require_paths=["lib"]
    • 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 ♥