1

does somebody know why data will not be stored in mongodb in a railway-project using the --coffee option?

Creating a project the regular way (w/o --coffee option) data will be saved in mongodb. So when do the following:

railway init blog && cd blog

and after modifying the database.json to

{ "development":
  { "driver":   "mongoose"
  , "host":     "localhost"
  , "database": "blog_dev"
  }
}

everything works fine when I install all dependencies and start the server with

npm install -l
railway g scaffold post title content
railway s

So far. But when I create a project with --coffee option like:

railway init blog --coffee

and after modifying the database.yml (this is different in coffe-mode) to

development:
  driver:   "mongoose"
  host:     "localhost"
  database: "blog_dev"

and after installing all dependencies and start the server with

npm install -l
railway g scaffold post title content --coffee
railway s

data will only stored in memory.

any idea?

David
  • 54
  • 9
  • using the old database.json file extension (with JSON content of course) it seems to work. maybee its in issue of railway using the --coffee option that it creates a database.yml file – David Aug 07 '12 at 12:30

1 Answers1

2

Use database.json instead of database.yml:

{
  "development": {
    "driver": "mongoose",
    "host": "localhost",
    "database": "blahblahblah"
  },
  "test": {
    "driver": "memory"
  }
}
j0k
  • 22,600
  • 28
  • 79
  • 90
aratak
  • 364
  • 2
  • 8