[Rubygems-developers] Please help: Syntax error observed "Unexpected Token"

beegee beegee bgquest at gmail.com
Sat Mar 19 13:47:19 EDT 2011


Hi All,
I have a mac os x tiger 10.4.11, and ruby i.8.6.  I was trying to open a
file using the following command

$ File.open('new-inventory.txt')
-bash: syntax error near unexpected token `'new-inventory.txt''

Then I tried double quotes

$ File.open("new-inventory.txt")
-bash: syntax error near unexpected token `"new-inventory.txt"'

I also tried

File.open("new-inventory.txt", "r")
-bash: syntax error near unexpected token `"new-inventory.txt",'

*My question is, how do I open this file (new-inventory.txt)  and how do i
read from it?*

*Regards*
*
*


More information about the Rubygems-developers mailing list