1

I get this when I run a main.rb file from OSX command line

`require': no such file to load -- EngineAPIWrapper (LoadError)

I have tried putting all the files that it references within the same folder instead of sym links but I still get the problem

if I require 'rubygems' at the top of the main.rb file I get this error instead:

link-mbp:~ benb$ ruby /Library/Application\ Support/Episode/Engine/SDK/Samples/ruby/xmlrpc/engine_client.rb 
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- EngineAPIWrapper (LoadError)
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
    from /Library/Application Support/Episode/Engine/SDK/Samples/ruby/xmlrpc/engine_client.rb:14

The top of the source file looks like this:

require 'rubygems'
require 'xmlrpc/client'
require 'EngineAPIWrapper'
require 'pp'
require 'English'    

that is, I don't see anything wrong with how I am running things.

Any help is appreciated!

Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
theprojectabot
  • 1,163
  • 12
  • 19

2 Answers2

1

In 99% of all cases, when a computer tells you that it couldn't find something, the reason is that it is not there. In the other 1% of cases, the computer is looking in the wrong place.

So, in order for require 'EngineAPIWrapper' to work, there has to be a file named EngineAPIWrapper.rb and that file has to be in a directory which is in Ruby's $LOAD_PATH.

Jörg W Mittag
  • 363,080
  • 75
  • 446
  • 653
  • I needed to run the script from the path that it existed in or make ruby aware of the file in the load path thanks. – theprojectabot Oct 14 '10 at 22:21
  • I couldnt just say ruby /Library/ instead I needed to cd to the file path.. and even then I had to make sure to run it in arch -i386 mode as there were some 32bit dependancies. – theprojectabot Oct 14 '10 at 22:21
1

Run gem list. Is EngineAPIWrapper mentioned?

Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338