Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am paulodelgado on github.
* I am paulodelgado (https://keybase.io/paulodelgado) on keybase.
* I have a public key ASCKnO4jBMa5hKQrmyMhpCGPfTeWwk_xdkgJxUUFLD96zQo
To claim this, I am signing this object:
server:coreclient paulo$ sudo rake routes --trace
(in /Applications/Server.app/Contents/ServerRoot/usr/share/collabd/coreclient)
rake aborted!
uninitialized constant Rake::DSL
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2503:in `const_missing'
/Applications/Server.app/Contents/ServerRoot/usr/share/collabd/gems/vendor/bundle/ruby/1.8/gems/rake-0.9.2/lib/rake/tasklib.rb:8
/Applications/Server.app/Contents/ServerRoot/usr/share/collabd/gems/vendor/bundle/ruby/1.8/gems/rdoc-3.10/lib/rdoc/task.rb:37:in `require'
/Applications/Server.app/Contents/ServerRoot/usr/share/collabd/gems/vendor/bundle/ruby/1.8/gems/rdoc-3.10/lib/rdoc/task.rb:37
/Applications/Server.app/Contents/ServerRoot/usr/share/collabd/gems/vendor/bundle/ruby/1.8/gems/railties-3.0.10/lib/rails/tasks/documentation.rake:2:in `require'
/Applications/Server.app/Contents/ServerRoot/usr/share/collabd/gems/vendor/bundle/ruby/1.8/gems/railties-3.0.10/lib/rails/tasks/documentation.rake:2
@paulodelgado
paulodelgado / MongoRename.js
Created February 14, 2011 21:26
mass rename of an attribute in Mongo
// Mass rename of an attribute in Mongo
var cursor = db.my_collection.find({old_attribute: {$exists: true}});
while(cursor.hasNext()) {
db.my_collection.update({_id:elem._id}, {$unset: {old_attribute:1}, $set: {new_attribute: elem.old_attribute}});
}