title: NameError: uninitialized constant Game
body: <p>I have a file Word.rb</p>
  
  <pre><code>class Word
  
  attr_accessor :word, :letters
  
      def initialize (word)
          #@word = word
          @letters = word.split('').map{|letter| {:letter =&gt; letter, :hidden =&gt; true} }
      end
  
  end
  </code></pre>
  
  <p>and another file Game.rb, which will use Word.rb</p>
  
  <pre><code>require_relative ('./Word.rb') 
  require 'pry'
  
  class Game 
  
  attr_accessor :guesses, :guessed_letters, :words, :current_word
  
      def initialize (words)
          @guesses = 0
          @guessed_letters = []
          @words = words
          @current_word = current_word
      end
  end
  </code></pre>
  
  <p>And I'm getting the following error: </p>
  
  <blockquote>
    <p>NameError: uninitialized constant Game</p>
  </blockquote>
  
  <p>When I try to create a instance of Game like this:</p>
  
  <pre><code>game = Game.new(['hello', 'sunshine', 'chipmunk', 'twitch'])
  </code></pre>
  
  <p>I just am not sure what I am doing wrong since I am requiring the <code>Word.rb</code> file that <code>Game.rb</code> will need. All files are on the same level, nothing is in a subdirectory. Interestingly, I do not get this error once I comment the <code>require_relative</code> line out (but of course, I need that file required). I have also tried not using <code>require_relative</code> and simply using <code>require</code> as well as a couple other varieties: parens/no parens, file extension/no file extension, etc. How do I properly require this file? I also have a lovely and robust array of words sitting in another file that I would like to require to be used and passed into <code>Game.new()</code>.</p>