D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
td-agent
/
embedded
/
lib
/
ruby
/
gems
/
2.1.0
/
gems
/
mongo-2.2.7
/
bin
/
Filename :
mongo_console
back
Copy
#!/usr/bin/env ruby $LOAD_PATH[0, 0] = File.join(File.dirname(__FILE__), '..', 'lib') require 'mongo' # include the mongo namespace include Mongo begin require 'pry' rescue LoadError end begin require 'irb' rescue LoadError end if defined?(Pry) Pry.config.prompt_name = 'mongo' Pry.start elsif defined?(IRB) IRB.start else abort 'LoadError: mongo_console requires Pry or IRB' end