I am trying to write a scanner using the anemone gem, which requires the robots gem. For some reason, robots do not turn on at all. Here are some details about my environment:
$ gem list -d robots *** LOCAL GEMS *** robots (0.10.1) Author: Kyle Maxwell Homepage: http://github.com/fizx/robots Installed at: /usr/local/lib/ruby/gems/1.9.1 Simple robots.txt parser $ gem env RubyGems Environment: - RUBYGEMS VERSION: 1.8.10 - RUBY VERSION: 1.9.2 (2011-02-18 patchlevel 180) [x86_64-darwin10.7.0] - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1 - RUBY EXECUTABLE: /usr/local/bin/ruby - EXECUTABLE DIRECTORY: /usr/local/bin - RUBYGEMS PLATFORMS: - ruby - x86_64-darwin-10 - GEM PATHS: - /usr/local/lib/ruby/gems/1.9.1 - /Users/ryan/.gem/ruby/1.9.1 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://rubygems.org/ $ gem which robots /usr/local/lib/ruby/gems/1.9.1/gems/robots-0.10.1/lib/robots.rb
Any ideas? All other stones load correctly, I have never had this problem before. Please note that I am using ruby ββversion 1.9, so rubygems is implicitly required. Adding
require 'rubygems'
... the script returns false to the beginning, since the file is already included and does not help the situation. Any ideas?
EDIT: Post examples of failed code. Please note that rubygems returning false does not mean that rubygems cannot load - rather, it has already been downloaded. See This Post: http://www.ruby-forum.com/topic/157442
$ irb irb(main):001:0> require 'rubygems' => false irb(main):002:0> require 'active_record' => true irb(main):003:0> require 'mechanize' => true irb(main):004:0> require 'robots' LoadError: no such file to load -- robots from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `require' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require' from (irb):4 from /usr/local/bin/irb:12:in `<main>' irb(main):005:0>
source share