I am working on Zed Shaw\'s Learn Ruby the Hard Way Exercise 25
http://ruby.learncodethehardway.org/ex25.html
When I navigate to the directory that holds the
This is because the working directory is no longer in the Ruby path in Ruby 1.9.2. This does work:
require './ex25'
This is actually a mistake on my part when I was writing the exercise. @mischa is spot on with his solution, but you'll notice as you progress through the book that subsequent exercises use the require_relative
command instead of require
.
The various methods for ensuring that your working directory is in the load path are described here, but I suggest you pick one and remain consistent.