Last active
July 7, 2016 22:35
-
-
Save jkutner/b1ab0b749901853e5aa1f1ca628d93a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir .gem | |
export GEM_HOME=.gem | |
export GEM_PATH=.gem | |
gem install mongo --no-rdoc --no-ri | |
cat <<RUBY > mongo-test.rb | |
require 'mongo' | |
client = Mongo::Client.new(ENV['MONGOLAB_URI'] || ENV['MONGODB_URI']) | |
database = client.database | |
puts "collections: #{database.collection_names.inspect}" | |
RUBY | |
ruby mongo-test.rb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment