I’m doing some command line executions I learned in this blog post such as system or IO.popen on the file, and am getting errors.
Why is the backtick appearing, what does it mean, and how do I continue? Please explain.
system('./err.rb')
-bash: syntax error near unexpected token `'./err.rb''
Similarily, when I run IO.popen:
output = IO.popen('./err.rb')
-bash: syntax error near unexpected token `('
That’s not ruby you’re typing things into, it’s your shell bash. Assuming you’ve got ruby installed properly, type
irbto get a ruby prompt and you should be able to proceed from there.