Not sure what happen do my ruby install
$ ruby -version
ruby 1.8.7 (2013-12-22 patchlevel 375) [i686-darwin13.3.0]
-e:1: undefined local variable or method rsion' for main:Object (NameError)
You can string multiple parameters together when you run Ruby. In this case, -v is being interpreted as 'version' where as the 'e' is being interpreted as -e, which from the man page:
Specifies script from command-line while telling Ruby not to search the rest of the arguments for a script file name.
Ruby is then trying to parse the remainder ('rsion') as an argument to the -e. What you want it either:
ruby -v
or
ruby --version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With