The user is trying to install Ruby on their Mac but receives errors when attempting to run the configure script or change directories into the downloaded Ruby file. They are then able to successfully run irb and evaluate basic Ruby expressions like string concatenation and arithmetic but receive errors when trying to use undefined methods like put or constants like MATH.
The user is trying to install Ruby on their Mac but receives errors when attempting to run the configure script or change directories into the downloaded Ruby file. They are then able to successfully run irb and evaluate basic Ruby expressions like string concatenation and arithmetic but receive errors when trying to use undefined methods like put or constants like MATH.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as RTF, PDF, TXT or read online from Scribd
The user is trying to install Ruby on their Mac but receives errors when attempting to run the configure script or change directories into the downloaded Ruby file. They are then able to successfully run irb and evaluate basic Ruby expressions like string concatenation and arithmetic but receive errors when trying to use undefined methods like put or constants like MATH.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as RTF, PDF, TXT or read online from Scribd
-bash: ./configure: No such file or directory aldrich-cherrys-macbook-pro:~ AC$ cd/Users/AC/Downloads/ruby-1.9.1-p243.tar -bash: cd/Users/AC/Downloads/ruby-1.9.1-p243.tar: No such file or directory aldrich-cherrys-macbook-pro:~ AC$ irb >> hello world NameError: undefined local variable or method `world' for main:Object from (irb):1 >> "hello world" => "hello world" >> put "hello World" NoMethodError: undefined method `put' for main:Object from (irb):3 >> 3-2 => 1 >> A = 3**2 => 9 >> B = 4**2 => 16 >> MATH.SQRT(A+B) NameError: uninitialized constant MATH from (irb):7 >> SQRT(A+B) NoMethodError: undefined method `SQRT' for main:Object from (irb):8 >> Working with Ruby on a MAC Aldrich Cherry