{"issue":{"created_at":"2011-11-12T14:20:27Z","state":"closed","updated_at":"2011-11-28T07:21:25Z","comments":2,"user":{"gravatar_id":"24c2220917e8d3b90e7646ffe9d080f9","id":1031,"url":"https://api.github.com/users/jasonm","avatar_url":"https://secure.gravatar.com/avatar/24c2220917e8d3b90e7646ffe9d080f9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"jasonm"},"body":"Howdy!\r\n\r\nI've been following derby for a little bit, and saw your presentation at KRTconf.  (Great presentation!)  I really like the direction you're going.\r\n\r\nI'm pretty fresh to node (been doing Ruby and Rails the past few years, and Backbone the past ~6 months) and am trying to run through the derby examples.\r\n\r\nWhen I run the chat example, and type into the username box in the browser, I get the following:\r\n\r\n```\r\n[master][~/dev/derby/examples/chat] node server.js \r\n   info  - socket.io started\r\nExpress server started in development mode\r\nGo to: http://localhost:3002/\r\n   debug - client authorized\r\n   info  - handshake authorized 2025404070337778023\r\n   debug - setting request GET /socket.io/1/websocket/2025404070337778023\r\n   debug - set heartbeat interval for client 2025404070337778023\r\n   debug - client authorized for \r\n   debug - websocket writing 1::\r\n   debug - websocket writing 5:::{\"name\":\"txnNum\",\"args\":[0]}\r\n   debug - websocket writing 5:::{\"name\":\"txnErr\",\"args\":[{\"stack\":\"Error: ERR unknown command 'eval'\\n    at RedisReplyParser.<anonymous> (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/index.js:78:27)\\n    at RedisReplyParser.emit (events.js:64:17)\\n    at RedisReplyParser.send_error (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/lib/parser/javascript.js:265:14)\\n    at RedisReplyParser.execute (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/lib/parser/javascript.js:124:22)\\n    at RedisClient.on_data (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/index.js:358:27)\\n    at Socket.<anonymous> (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/index.js:93:14)\\n    at Socket.emit (events.js:64:17)\\n    at Socket._onReadable (net.js:672:14)\\n    at IOWatcher.onReadable [as callback] (net.js:177:10)\",\"message\":\"ERR unknown command 'eval'\"},\"3.29\"]}\r\n   debug - websocket writing 5:::{\"name\":\"txnErr\",\"args\":[{\"stack\":\"Error: ERR unknown command 'eval'\\n    at RedisReplyParser.<anonymous> (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/index.js:78:27)\\n    at RedisReplyParser.emit (events.js:64:17)\\n    at RedisReplyParser.send_error (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/lib/parser/javascript.js:265:14)\\n    at RedisReplyParser.execute (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/lib/parser/javascript.js:124:22)\\n    at RedisClient.on_data (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/index.js:358:27)\\n    at Socket.<anonymous> (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/index.js:93:14)\\n    at Socket.emit (events.js:64:17)\\n    at Socket._onReadable (net.js:672:14)\\n    at IOWatcher.onReadable [as callback] (net.js:177:10)\",\"message\":\"ERR unknown command 'eval'\"},\"3.30\"]}\r\n   debug - websocket writing 5:::{\"name\":\"txnErr\",\"args\":[{\"stack\":\"Error: ERR unknown command 'eval'\\n    at RedisReplyParser.<anonymous> (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/index.js:78:27)\\n    at RedisReplyParser.emit (events.js:64:17)\\n    at RedisReplyParser.send_error (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/lib/parser/javascript.js:265:14)\\n    at RedisReplyParser.execute (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/lib/parser/javascript.js:124:22)\\n    at RedisClient.on_data (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/index.js:358:27)\\n    at Socket.<anonymous> (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/index.js:93:14)\\n    at Socket.emit (events.js:64:17)\\n    at Socket._onReadable (net.js:672:14)\\n    at IOWatcher.onReadable [as callback] (net.js:177:10)\",\"message\":\"ERR unknown command 'eval'\"},\"3.31\"]}\r\n   debug - websocket writing 5:::{\"name\":\"txnErr\",\"args\":[{\"stack\":\"Error: ERR unknown command 'eval'\\n    at RedisReplyParser.<anonymous> (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/index.js:78:27)\\n    at RedisReplyParser.emit (events.js:64:17)\\n    at RedisReplyParser.send_error (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/lib/parser/javascript.js:265:14)\\n    at RedisReplyParser.execute (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/lib/parser/javascript.js:124:22)\\n    at RedisClient.on_data (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/index.js:358:27)\\n    at Socket.<anonymous> (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/index.js:93:14)\\n    at Socket.emit (events.js:64:17)\\n    at Socket._onReadable (net.js:672:14)\\n    at IOWatcher.onReadable [as callback] (net.js:177:10)\",\"message\":\"ERR unknown command 'eval'\"},\"3.32\"]}\r\n   debug - websocket writing 5:::{\"name\":\"txnErr\",\"args\":[{\"stack\":\"Error: ERR unknown command 'eval'\\n    at RedisReplyParser.<anonymous> (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/index.js:78:27)\\n    at RedisReplyParser.emit (events.js:64:17)\\n    at RedisReplyParser.send_error (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/lib/parser/javascript.js:265:14)\\n    at RedisReplyParser.execute (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/lib/parser/javascript.js:124:22)\\n    at RedisClient.on_data (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/index.js:358:27)\\n    at Socket.<anonymous> (/Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/redis/index.js:93:14)\\n    at Socket.emit (events.js:64:17)\\n    at Socket._onReadable (net.js:672:14)\\n    at IOWatcher.onReadable [as callback] (net.js:177:10)\",\"message\":\"ERR unknown command 'eval'\"},\"3.33\"]}\r\n```\r\n\r\nMy node and npm information:\r\n\r\n```\r\n[master][~/dev/derby/examples/chat] npm --version\r\n1.0.105\r\n[master][~/dev/derby/examples/chat] node --version\r\nv0.4.12\r\n[master][~/dev/derby/examples/chat] npm ls\r\nnpm WARN es5-shim@1.2.10 package.json: bugs['web'] should probably be bugs['url']\r\nnpm WARN seq >=0.1.7 Unmet dependency in /Users/jasonmorrison/dev/derby/examples/chat/node_modules/derby/node_modules/racer/node_modules/browserify/node_modules/detective/node_modules/findit\r\nderby-chat-example@0.0.0 /Users/jasonmorrison/dev/derby/examples/chat\r\n├── coffee-script@1.1.3 \r\n├─┬ connect-gzip@0.1.5 \r\n│ ├─┬ connect@1.7.3 \r\n│ │ └── qs@0.3.2 \r\n│ └── mime@1.2.4 \r\n├─┬ derby@0.1.1 \r\n│ ├── commander@0.2.1 \r\n│ ├── mkdirp@0.0.7 \r\n│ ├── nib@0.2.0 \r\n│ ├── qs@0.3.2 \r\n│ ├─┬ racer@0.1.1 \r\n│ │ ├─┬ browserify@1.7.7 \r\n│ │ │ ├── commondir@0.0.0 \r\n│ │ │ ├─┬ detective@0.0.3 \r\n│ │ │ │ ├─┬ burrito@0.2.11 \r\n│ │ │ │ │ ├── traverse@0.5.2 \r\n│ │ │ │ │ └── uglify-js@1.0.7 \r\n│ │ │ │ └─┬ findit@0.1.0  extraneous\r\n│ │ │ │   └── UNMET DEPENDENCY seq >=0.1.7\r\n│ │ │ ├── nub@0.0.0 \r\n│ │ │ ├─┬ optimist@0.2.8 \r\n│ │ │ │ └── wordwrap@0.0.2 \r\n│ │ │ └── resolve@0.0.4 \r\n│ │ ├── es5-shim@1.2.10 \r\n│ │ ├── redis@0.6.7 \r\n│ │ ├─┬ share@0.4.1 \r\n│ │ │ ├─┬ connect@1.7.3 \r\n│ │ │ │ └── mime@1.2.4 \r\n│ │ │ ├── hat@0.0.3 \r\n│ │ │ ├── mustache@0.3.1-dev  extraneous\r\n│ │ │ ├─┬ optimist@0.2.8 \r\n│ │ │ │ └── wordwrap@0.0.2 \r\n│ │ │ └── redis@0.6.7  extraneous\r\n│ │ ├─┬ socket.io@0.8.7 \r\n│ │ │ └── policyfile@0.0.4 \r\n│ │ └─┬ socket.io-client@0.8.7 \r\n│ │   ├── uglify-js@1.0.6 \r\n│ │   ├── websocket-client@1.0.0 \r\n│ │   └── xmlhttprequest@1.2.2 \r\n│ ├─┬ stylus@0.19.2 \r\n│ │ ├── cssom@0.2.0 \r\n│ │ └── growl@1.1.0 \r\n│ └── uglify-js@1.1.1 \r\n└─┬ express@2.5.0 \r\n  ├── connect@1.7.3 \r\n  ├── mime@1.2.4 \r\n  ├── mkdirp@0.0.7 \r\n  └── qs@0.3.2 \r\n```\r\n\r\nIn the browser, I get an exception:\r\n\r\n```\r\n\r\nready(function(model) {\r\n    var displayTime, i, message, messagePath, months, time, _len, _ref2;\r\n    months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];\r\n    displayTime = function(time) {\r\n      var hours, minutes, period;\r\n      time = new Date(time);\r\n      hours = time.getHours();\r\n      period = hours < 12 ? ' am, ' : ' pm, ';\r\n      hours = (hours % 12) || 12;\r\n      minutes = time.getMinutes();\r\n      if (minutes < 10) minutes = '0' + minutes;\r\n      return hours + ':' + minutes + period + months[time.getMonth()] + ' ' + time.getDate() + ', ' + time.getFullYear();\r\n    };\r\n    _ref2 = model.get('_room.messages');\r\n    for (i = 0, _len = _ref2.length; i < _len; i++) {\r\n      //\r\n      // On the line above: gen/L99FClvcujfbSS1m7aECAQ.js:3156 Uncaught TypeError: Cannot read property 'length' of undefined\r\n      //\r\n      message = _ref2[i];\r\n      messagePath = \"_room.messages.\" + i;\r\n      if (time = model.get(messagePath + '.time')) {\r\n        model.set(messagePath + '._displayTime', displayTime(time));\r\n      }\r\n    }\r\n```","assignee":null,"id":2217218,"number":1,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"title":"Error: ERR unknown command 'eval' in chat example","closed_at":"2011-11-28T07:21:25Z","html_url":"https://github.com/codeparty/derby/issues/1","milestone":null,"url":"https://api.github.com/repos/codeparty/derby/issues/1"},"action":"created","comment":{"created_at":"2011-11-28T07:21:25Z","updated_at":"2011-11-28T07:21:25Z","user":{"gravatar_id":"e9dae05ec14a68730db9f3a26214cb51","id":232244,"url":"https://api.github.com/users/nateps","avatar_url":"https://secure.gravatar.com/avatar/e9dae05ec14a68730db9f3a26214cb51?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"nateps"},"body":"Nomon is correct. Currently, Derby requires the Redis 2.2-scripting branch. Stable releases of Redis, including Redis 2.4 do not include this feature yet. Scripting support is scheduled for Redis 2.6.\r\n\r\nInstructions for installing Redis 2.2-scripting are here: http://derbyjs.com/#getting_started","id":2893773,"url":"https://api.github.com/repos/codeparty/derby/issues/comments/2893773"}}