node.jsrailway.js

Problems with RailwayJS (node.js): Redis connection to localhost:6379 failed - connect ECONNREFUSED


I found this web framework for node.js similar to Rails: http://railwayjs.com/

I followed all the steps:

sudo npm install railway -g

railway init blog && cd blog
npm install -l
railway generate crud post title content
# ensure mongodb is running
railway server 8888
open http://127.0.0.1:8888/posts

But I'm getting this error when I start the server:

alex@alex-System-Product-Name:~/blog$ sudo status mongodb
mongodb start/running, process 5836
alex@alex-System-Product-Name:~/blog$ railway server 8888
The "sys" module is now called "util". It should have a similar interface.
Railway server listening on port 8888 within development environment

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED
    at RedisClient.on_error (/home/alex/blog/node_modules/railway/node_modules/jugglingdb/node_modules/redis/index.js:136:24)
    at Socket.<anonymous> (/home/alex/blog/node_modules/railway/node_modules/jugglingdb/node_modules/redis/index.js:70:14)
    at Socket.emit (events.js:67:17)
    at Array.0 (net.js:299:25)
    at EventEmitter._tickCallback (node.js:192:40)

Does anyone knows what's the problem?


Solution

  • I had to install Redis for Ubuntu (the OS I was using). Then run redis-server in the terminal.