Wednesday 15 August 2012

web services - Where to put new ruby library -


I am currently writing a small ruby ​​script, I have the following line in that script.

  requires 'amazon / search'   

I am getting the error while running this script. C: /Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb: 45: requires : this file can not be loaded - Amazon / Search (load error) by C: / Ruby200 / lib / ruby ​​/ 2.0.0 / rubygems / core_ext / kernel_require.rb: 45: in requirement '

I have downloaded (Ruby-Amazon-1.9) 2.tar.gz after extracting, I am getting file system and files including lib / amazon / search. I have these files c: \ ruby 200%. But it did not help if you have any information about it, please help.

Where is amazon / search.rb file located? Is it in the same directory as your script? You probably only need to adjust to add it that contains the amazon / directory in the directory if it is in the library ./ lib , you can do it < Code> $ LOAD_PATH & lt; & Lt; './lib' .

Of course, such a thing is usually better controlled by package management system like RubyJams, so if you can find a library that will make things easier for a gem.

No comments:

Post a Comment