This file contains 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
### 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: |
This file contains 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
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 |
This file contains 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
// 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}}); | |
} |