Note that there are some explanatory texts on larger screens.

plurals
  1. PORequire command not working within bash irb on Snow Leopard
    primarykey
    data
    text
    <p>I am working on Zed Shaw's Learn Ruby the Hard Way Exercise 25</p> <p><a href="http://ruby.learncodethehardway.org/ex25.html" rel="nofollow">http://ruby.learncodethehardway.org/ex25.html</a></p> <p>When I navigate to the directory that holds the ruby file ex25.rb and launch IRB, I get these errors:</p> <pre><code>Larson-2:~ larson$ cd Ruby Larson-2:Ruby larson$ ls ex25.rb Larson-2:Ruby larson$ irb ruby-1.9.2-p290 :001 &gt; 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 `&lt;main&gt;' ruby-1.9.2-p290 :002 &gt; </code></pre> <p>It seems that the require command isn't working here. Is there something I am missing?</p> <p>I also tried require './25' as suggested and get these errors:</p> <pre><code>Larson-2:Ruby larson$ irb ruby-1.9.2-p290 :001 &gt; 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 `&lt;main&gt;' </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload