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
--- Active Support Version: 2.3.8 --- | |
Loaded suite /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader | |
Started | |
.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. |
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
> db.followings.find() | |
{ "_id" : ObjectId("4c2be9944fcb0625aa00002d"), "followed_id" : ObjectId("4c2be9944fcb0625aa00002c"), "follower_id" : ObjectId("4c2be9944fcb0625aa00002b"), "active" : true } | |
{ "_id" : ObjectId("4c2be9954fcb0625aa000030"), "followed_id" : ObjectId("4c2be9954fcb0625aa00002f"), "follower_id" : ObjectId("4c2be9954fcb0625aa00002e"), "active" : true } | |
map = function( ) { | |
emit( followed.permalink, followed ); | |
}; | |
reduce = function( k, vals ) { return 1; } |
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
var user = User.find( { first_name : 'Nicholas' } ).exec( ); | |
user.first( function(result) { | |
sys.puts( result.__doc.first_name ); | |
}); | |
user.first( function(result) { | |
sys.puts( result.__doc.last_name ); | |
}); |
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
app.configure( function ( ) { | |
app.use( connect.staticProvider( __dirname + '/public' ) ); | |
app.use( connect.logger( { format: ':method :uri' } ) ); | |
app.set( 'view engine', 'jade' ); | |
} ); |
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
[ngw@slicingupeyeballs:~]$ curl http://npmjs.org/install.sh | sh (08-05 16:46) | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 194 100 194 0 0 221 0 --:--:-- --:--:-- --:--:-- 460 | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 2339k 100 2339k 0 0 203k 0 0:00:11 0:00:11 --:--:-- 506k | |
./cli.js --auto-activate always install npm@stable | |
npm it worked if it ends with ok | |
npm cli [ '--auto-activate', 'always', 'install', 'npm@stable' ] |
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
require.paths.unshift( __dirname + '..' ); | |
var sys = require( 'sys' ), | |
vows = require( 'vows' ), | |
assert = require( 'assert' ); | |
var app = require( __dirname + '/..' + '/app.js' ); | |
vows.describe( 'The Kenji app' ).addBatch( { | |
'The application configuration': { |
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
require.paths.unshift( __dirname + '..' ); | |
var sys = require( 'sys' ), | |
vows = require( 'vows' ), | |
assert = require( 'assert' ); | |
var app = require( __dirname + '/..' + '/app.js' ); | |
vows.describe( 'The Kenji app' ).addBatch( { | |
'The application configuration': { |
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
// code | |
require.paths.unshift( __dirname + '/lib' ); | |
require.paths.unshift( __dirname + '/vendor/mongoose' ); | |
var sys = require( 'sys' ), | |
fs = require( 'fs' ), | |
connect = require( 'connect' ), | |
express = require( 'express' ); |
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
/Users/ngw/.rvm/gems/ree-1.8.7-2010.02/gems/mongoid-1.9.2/lib/mongoid/config.rb:167:in `_master': You have a nil object when you didn't expect it! (NoMethodError) | |
You might have expected an instance of ActiveRecord::Base. | |
The error occurred while evaluating nil.[] | |
from /Users/ngw/.rvm/gems/ree-1.8.7-2010.02/gems/mongoid-1.9.2/lib/mongoid/config.rb:117:in `from_hash' | |
from /Users/ngw/zooppa/config/initializers/mongoid.rb:7 | |
from /Users/ngw/.rvm/gems/ree-1.8.7-2010.02/gems/mongoid-1.9.2/lib/mongoid.rb:93:in `configure' | |
from /Users/ngw/zooppa/config/initializers/mongoid.rb:6 | |
from /Users/ngw/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:171:in `load_without_new_constant_marking' | |
from /Users/ngw/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:171:in `load' | |
from /Users/ngw/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:547:in `new_constants_in' |
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
map.resources :brands | |
brands GET /brands(.:format) {:controller=>"brands", :action=>"index"} | |
POST /brands(.:format) {:controller=>"brands", :action=>"create"} | |
new_brand GET /brands/new(.:format) {:controller=>"brands", :action=>"new"} | |
edit_brand GET /brands/:id/edit(.:format) {:controller=>"brands", :action=>"edit"} | |
brand GET /brands/:id(.:format) {:controller=>"brands", :action=>"show"} | |
PUT /brands/:id(.:format) {:controller=>"brands", :action=>"update"} | |
DELETE /brands/:id(.:format) {:controller=>"brands", :action=>"destroy"} |
OlderNewer