require 'mongo'
include Mongo
client = Mongo::Client.new([ '127.0.0.1:27017' ], :database => 'publicdb')
client[:con].indexes.create_many([
{ :key => { name: 1 }},
{ :key => { label: -1 }}
])
db.con.createIndex({"name.tree":1}), при попытке указать Ruby строку {:key => {name.tree: 1}} выдает ошибку
syntax error, unexpected ':', expecting =>
{ :key => { name.wer: 1 }},