Bmoe
Bmoe

Reputation: 978

All Ruby commands immediately close

I did a fresh install of Ruby 2.6.5 x86 on my Windows Server 2016 64-bit machine (previously had 64-bit 2.6.5 and some 2.4.5 version. Can't remember if it was 32/64 bit). I did NOT run the MSYS install at the end. I see the PATH has been updated to include ruby. When I type ruby in a command prompt nothing happens. I do not get a message saying ruby is unrecognized. It actually looks like ruby is going to open (I see mouse loading animation) in the command prompt but then immediately terminates. How do I fix this?CMD

PATH

As requested here are the results of where ruby: where ruby

Upvotes: 0

Views: 74

Answers (1)

HJVT
HJVT

Reputation: 2192

ruby

is not interactive interpreter, it is only used to run complete scripts like this:

ruby script.rb

Use

irb

for interactive programming. You also can run a script and then poke around inside it with

irb -r ./script.rb

Upvotes: 1

Related Questions