I’m a WIndows user. I used the “one-click installer” and installed
ruby 1.86. I followed the book’s instructions to run RubyGem. I tried
typing commands like
-require ‘C:/ruby/bin/gem’(this is the path where the gem is stored)
-gem list
The “require” statement is supposed to be used from inside a Ruby
program, not from the command line. If your Ruby and Rubygems
installations are properly configured, you should not need to specify
the full path yo tour gems inside your Ruby programs.
As for “gem list”, it is indeed supposed to be used from your command
prompt. It will list all gems installed on your system. If it doesn’t
work, odds are Ruby and Rubygems haven’t been properly installed.
Nothing worked. Please help.
work, odds are Ruby and Rubygems haven’t been properly installed.
to install a gem (like e.g. `haml’), use from your command prompt
gem install haml
then you should be able to find it in the list of installed gems, with
gem list
in your program include the lines
require ‘rubygems’ # for Ruby version 1.8.x
require ‘haml’
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.