The difference isn't between Windows and OSX, it's between Ruby >1.9.2 and earlier version of Ruby. Since Ruby 1.9.2 the current directory is no longer included in the load path, so you can't just require files in the current directory using their relative filename. I assume your OSX system has a version of Ruby before 1.9.2 installed.

To fix your issue, you can either require the file when starting irb using the -r flag (i.e. invoke "irb -r book" instead of just irb) or you can require the absolute filename using require "#{Dir.pwd}/book" or you can add the current directory to the load path using $LOAD_PATH << "." .

Note that in ruby files it is now recommended to use the new require_relative method to require files that are in the same directory as the file from which you're requiring. This avoids many problems that using require to do this had. That doesn't help you in irb though.