I’m a Ruby/Rails newbie.
I’ve just created my first Ruby gem called GameFake. It’s like Faker
for video games.
Anyway, the gem works great in the irb. But when I fire up the Rails
console (./script/console) and try to require ‘gamefake’, I get all
kinds of syntax errors.
Once again, the code works great in the Ruby console.
The gem can be found here:
(sorry, not trying to do a shameless plug).
The actual syntax error is in the middle of the “SMS_Games” array. I’ve
looked over this array a million times. It’s large but should be ok.
Any suggestions on what I’m doing wrong?
Thanks for any help!
PS, anyone else type Ryby a million times when they are trying to type
Ruby? lol
The only thing that jumped out at me with that were the missing
characters - so for instance,
the accented e in Asterix doesn’t show up correctly on github. Without
a listing of the ‘all
kinds of syntax errors’, it’s hard to tell.
BTW, for storing arrays like this, Yaml might be more efficient…
–Matt J.
Matt J. wrote:
The only thing that jumped out at me with that were the missing
characters - so for instance,
the accented e in Asterix doesn’t show up correctly on github. Without
a listing of the ‘all
kinds of syntax errors’, it’s hard to tell.
BTW, for storing arrays like this, Yaml might be more efficient…
–Matt J.
That’s a good point. I loaded the array into komoto edit but never
noticed the accent marks. I will scan the list more thoroughly for
things like that.
Oh, and good idea on the Yaml tip!
Thanks!!