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 irb to get a ruby prompt and you should be able to proceed from there.
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