Can't use "require"

In command prompt, if I type

require ‘rubygems’

it says,
‘require’ is not recognized as an internal or external command,
operable program or batch file.

Help please.

Hiya Kaye,

I’m guessing you’re doing this at a Windows command prompt?

The question is, how might Windows know what ‘require’ means? The error
is telling you it’s looking for .exe, .bat files and so on. Require
means something to Ruby though and that’s where you need to direct your
require command (method).

For example, in a Windows CMD window type ‘irb’ and open Interactive
Ruby. Now type your: require ‘rubygems’, on my system it came back
‘true’. Closer to what you’re looking for.

DE

Kaye Ng wrote in post #1047523:

In command prompt, if I type

require ‘rubygems’

it says,
‘require’ is not recognized as an internal or external command,
operable program or batch file.

Help please.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs