public
Last active

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
#!/usr/bin/ruby
 
require "rubygems"
require "mongo"
require "mongomapper"
 
m = Mongo::Connection('localhost')
 
-------
 
OUT :
NameError: uninitialized constant Mongo
 
-------
 
# gem list --local | grep mongo
jnunemaker-mongomapper (0.3.5)
mongodb-mongo (0.14)
mongodb-mongo_ext (0.14.1)
 
-------
 
>> $LOAD_PATH
=> ["/Users/florian-fullsix/.gem/ruby/1.8/gems/mongo-0.1.0/bin", "/Users/florian-fullsix/.gem/ruby/1.8/gems/mongo-0.1.0/lib", "/Library/Ruby/Site/1.8", "/Library/Ruby/Site/1.8/powerpc-darwin9.0", "/Library/Ruby/Site/1.8/universal-darwin9.0", "/Library/Ruby/Site", "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8", "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/powerpc-darwin9.0", "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0", "."]
 
>> $LOADED_FEATURES
=> ["e2mmap.rb", "irb/init.rb", "irb/workspace.rb", "irb/context.rb", "irb/extend-command.rb", "irb/output-method.rb", "irb/notifier.rb", "irb/slex.rb", "irb/ruby-token.rb", "irb/ruby-lex.rb", "readline.bundle", "irb/input-method.rb", "irb/locale.rb", "irb.rb", "irb/completion.rb", "irb/ext/save-history.rb", "rubygems/defaults.rb", "thread.bundle", "thread.rb", "etc.bundle", "rbconfig.rb", "rubygems/exceptions.rb", "rubygems/requirement.rb", "rubygems/version.rb", "rubygems/dependency.rb", "rubygems/gem_path_searcher.rb", "rubygems/user_interaction.rb", "rubygems/platform.rb", "rubygems/specification.rb", "rubygems/source_index.rb", "rubygems/builder.rb", "stringio.bundle", "yaml/error.rb", "syck.bundle", "yaml/ypath.rb", "yaml/basenode.rb", "yaml/syck.rb", "yaml/tag.rb", "yaml/stream.rb", "yaml/constants.rb", "rational.rb", "date/format.rb", "date.rb", "yaml/rubytypes.rb", "yaml/types.rb", "yaml.rb", "rubygems/config_file.rb", "rubygems/custom_require.rb", "fileutils.rb", "rubygems.rb", "mongo/types/binary.rb", "mongo/types/dbref.rb", "mutex_m.rb", "mongo/util/byte_buffer.rb", "mongo/types/objectid.rb", "mongo/types/regexp_of_holding.rb", "mongo/types/undefined.rb", "socket.bundle", "nkf.bundle", "kconv.rb", "base64.rb", "mongo/util/ordered_hash.rb", "mongo/util/bson.rb", "mongo/message/message.rb", "mongo/message/opcodes.rb", "mongo/message/get_more_message.rb", "mongo/message/insert_message.rb", "mongo/message/kill_cursors_message.rb", "mongo/message/message_header.rb", "mongo/message/msg_message.rb", "mongo/message/query_message.rb", "mongo/message/remove_message.rb", "mongo/message/update_message.rb", "mongo/message.rb", "mongo/query.rb", "mongo/collection.rb", "mongo/admin.rb", "mongo/db.rb", "mongo/mongo.rb", "mongo/cursor.rb", "mongo.rb"]
 
>> Gem.source_index.gems.keys.select{|a| a.match(/mongo/)}
=> ["jnunemaker-mongomapper-0.3.5", "mongodb-mongo_record-0.4.2", "mongo-0.1.0", "mongodb-mongo-0.13", "mongodb-mongo-0.14", "mongodb-mongo-0.14.1", "mongodb-mongo_ext-0.14.1"]

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.