I am working on Zed Shaw Learn Ruby the Hard Way Exercise 25
http://ruby.learncodethehardway.org/ex25.html
When I go to the directory where the ruby โโfile ex25.rb is stored and IRB starts up, I get the following errors:
Larson-2:~ larson$ cd Ruby Larson-2:Ruby larson$ ls ex25.rb Larson-2:Ruby larson$ irb ruby-1.9.2-p290 :001 > require 'ex25' LoadError: no such file to load -- ex25 from /Users/larson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from /Users/larson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from (irb):1 from /Users/larson/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `<main>' ruby-1.9.2-p290 :002 >
The require command doesn't seem to work here. Is something missing?
I also tried using "./25" as suggested, and getting these errors:
Larson-2:Ruby larson$ irb ruby-1.9.2-p290 :001 > require './ex25' SyntaxError: /Users/larson/Ruby/ex25.rb:1: invalid multibyte char (US-ASCII) from /Users/larson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from /Users/larson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from (irb):1 from /Users/larson/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `<main>'
Andrew Lauer Barinov
source share