Note that there are some explanatory texts on larger screens.

plurals
  1. PORuby 2.0.0 cannot load such file even though gem is installed
    text
    copied!<p>I've tried all of the other solutions people have talked about on here, but none of them have helped / applied. </p> <p>I've written a Ruby script that requires the spreadsheet gem. The requiring works fine when I execute the script normally with <code>ruby myscript.rb</code>, but after running <code>chmod +x myscript.rb</code>, and then trying to run the program with <code>./myscript.rb</code> I get the following error....</p> <pre><code>/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- spreadsheet (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /Users/fcangialosi/dev/mTC/parse.rb:2:in `&lt;top (required)&gt;' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /Users/fcangialosi/dev/mTC/interpreter.rb:1:in `&lt;top (required)&gt;' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' from ./pmcnp.rb:7:in `&lt;main&gt;' </code></pre> <p>The beginning of my script looks like this:</p> <pre><code>#!/usr/bin/ruby require 'rubygems' require 'spreadsheet' </code></pre> <p>If anyone has any ideas, I would really appreciate it.</p>
 

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