Not logged inGosu Forums
Forum back to Help Search Register Login
Up Forum
Topic "require 'player' " in my_game.rb By smilinpiggy Date 2013-01-16 19:37
Hi, I'm a newbie to Ruby ... thanks in advance for any help :)

As I was following the beginner video tutorial one of the first steps is add to my_game.rb...

require 'player'

I did that and got an error.

/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- player (LoadError)
  from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
  from my_game.rb:3:in `<main>'

Finally got it to work by doing this that I read in another forum:

require './player'

Can someone please explain why that works?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill