Giter Club home page Giter Club logo

compound's People

Contributors

1602 avatar absynce avatar arnaudspanneut avatar biggora avatar c0d3x42 avatar cjapes avatar dasher avatar dtan avatar dwbutler avatar fodor0205 avatar fsateler avatar hayes avatar huge51 avatar keichii avatar lacivert avatar making3 avatar mansuleman avatar randunel avatar reedlaw avatar romb avatar rsileoni avatar sagivo avatar sargodarya avatar saschagehlich avatar siruli avatar stuartpb avatar taliesins avatar tinnt avatar xingrz avatar xudejian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

compound's Issues

-bash: railway

Hi! I'd installed railway through npm. But when I run railway init, seem that bash error: -bash: railway: command not found

Please assist.. thanks

Naming of the executable

For some reason the railway binary seems to be called "rw". That's counter-intuitive and it pollutes the namespace usually used for aliases. Using random names for commands because they're shorter is against best practices and common sense. It doesn't scale, there are only so many combinations of two letters. Developers are clever enough to set up a shorter alias anyway. Plus, it's really a bad idea to use aliases in the documentation, like "rw c xyz". Please, please, please reconsider this naming choice. Thanks!

Mongoose Schema.find (...) doesn't fill correctly

Been messing around with this issue for few days,
I have to drawback my mongoose to 1.8.4 because whenever i use mongoose driver >= 2.0.1, this odds issue happen

I'll try to reproduce the code
So i define db/schema.js as usual

var PostSchema = new Schema;
PostSchema.add({
    title: { type: String },
    content: { type: String },
    date: { type: Date },
    published: { type: Boolean },
});
mongoose.model("Post", PostSchema);
....

In test/db/post_controller.coffee

Post.find {}, (err, posts) -> // Works
Post.find {title: 'Some Title'}, (err, posts) -> // Works
Post.find {title: /^Some/}, (err, posts) -> // Works

Nothing wrong till this step, but when you practically doing in in app/controllers/posts_controller.coffe, such as this code

Post.findById '....', (err, posts) -> // Works
Post.find {}, (err, posts) -> // Works lfawlessly
Post.find {title: 'Some Title'}, (err, posts) -> // DOESN'T Works, err is null, all rows unfiltered will be outputed to 'posts'
Post.find {title: /^Some/}, (err, posts) -> // DOESN"T works as well, same as above
Post.find {published: false}, (err, posts) -> // DOESN"T works as well, same as above

This is kinda odd things, since didn't see code from ./node_modules/railway/lib/datamapper/mongoose.js messing around with the schema file.

The odds thing is it happens on the controller action or the REPL console, but not on the test unit.
In case you ask, My environments was Mac OS X Lion, mongod v1.8.3, node 0.4.12
What could be wrong? or does the rightwayjs monkey patching some code in mongoose that i didn't noticed? or do i miss something?

Unable to use a remote mongodb connection.

Unable to use a remote mongodb connection.
Constantly fails with this error.
Works fine if I use the default settings (localhost)

Please look into it.

This is my database.json

{ "development":
{ "driver": "mongoose"
, "host": "node:_@_.mongolab.com:27297/node"
}
}

This is the log:

Fri Aug 12 15:57:36 blog (master)$ railway server 8888
Railway server listening on port 8888 within development environment

node.js:116
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Cannot read property 'email_1' of null
at /Users/prem/Desktop/My Work Dropbox/Dropbox/My Work/projects/blog/node_modules/mongodb/lib/mongodb/db.js:513:23
at /Users/prem/Desktop/My Work Dropbox/Dropbox/My Work/projects/blog/node_modules/mongodb/lib/mongodb/db.js:562:28
at /Users/prem/Desktop/My Work Dropbox/Dropbox/My Work/projects/blog/node_modules/mongodb/lib/mongodb/cursor.js:125:30
at /Users/prem/Desktop/My Work Dropbox/Dropbox/My Work/projects/blog/node_modules/mongodb/lib/mongodb/cursor.js:168:32
at /Users/prem/Desktop/My Work Dropbox/Dropbox/My Work/projects/blog/node_modules/mongodb/lib/mongodb/cursor.js:467:67
at Array. (/Users/prem/Desktop/My Work Dropbox/Dropbox/My Work/projects/blog/node_modules/mongodb/lib/mongodb/cursor.js:661:7)
at EventEmitter._tickCallback (node.js:108:26)

Filter params in logging

Some input parameters should be SKIPPED from logging: credit card number, password, confirmation.

routes not being displayed

just downloaded the current git repo and did the following:

$ railway init
$ railway g controller home index

have config/routes.js as follows:
exports.routes = function (map) {
map.get( '/', 'home#index' );
};

and then getting nothing displayed for my routes when running:
$ railway routes

"Templating engine ejs is not supported"

Had this error message when I ran railway init . Just installed Railway, node version is 0.4.11, npm is 1.0.26--please let me know if you need any additional information.

Not sure if this is related but after generating the app I generated a scaffold, all the files including the ejs views seemed to be properly created. When I ran railway server 8888 and opened a Firefox tab to localhost:8888 I got the default page but when I went to /posts only a blank page came up in the browser, and in the terminal showed "GET /advtweets controller: advtweets action: index"

Coming from Rails to my first Node dev project Railway would be a huge boost if I can use.

Awesome

KEEP UP THE GOOD WORK PLS! :)

Just a small "info" you might need to change the name, there was a
php project which also used php railsway or something like this
and rails called him to change the name of the project.
To prevent this you might consider to change the name
before they mail you :)

Trying to run tests

Hi, I think I might be doing something wrong here, how do you run test on railway, I tried npm test in the project directory but nothing happens, it just returns to the command line, is there something I need to know, I am just starting in the world of unit testing in node, so please pardon me if I am missing something obvious here. Any guidance to get started will be much appreciated!!!

BTW. the fix you implemented for collection-wide routes works great thank you!!!

JB

Helper.js error.

Hi, I'm running scaffold for User. When tried to add new user user#new, console throw error on /railway/website/node_modules/railway/lib/helpers.js:219:9 (form_for helper).

** Seems like buf === undefined.

Passing :

    var buf = arguments.callee.caller.buf || {}

will render the form but the action is not submitted.

Please assist and thanks for wonderful framework. Make my life a bit easier on node.

Custom actions not working in resourceful routes

For some reason this simple route is not working

http://localhost:3000/sessions/oa-signin

The route is setup like this

map.resources('sessions', {except: ['show', 'edit', 'update', 'index']}, function (session) {
        session.get('oa-signin', 'sessions#oauthSignin');
    });

and all I get when I go to the url is this

Cannot GET /sessions/oa-signin

This started to happen after I upgrade to the latest railway version.

BTW. The route does work like this (as a regular route):

map.get('sessions/oa-signin', 'sessions#oauthSignin');

Any ideas?

Thank you!!!!

JB

Hosting.

Hey guys,

Great work. I'm curious, where could someone host a web app built with Node. Nodester seems promising - but it is also seems like it is still in beta stage. Where are you guys currently hosting?

Connect version?

Very promising tool, however I'm getting this when I start it up:

TypeError: Object # has no method 'staticProvider'
at HTTPServer. (/private/tmp/connect/foo/server.js:21:21)
at HTTPServer.configure (/usr/local/lib/node_modules/express/lib/http.js:445:8)
at Object. (/private/tmp/connect/foo/server.js:20:5)
at Module._compile (module.js:404:26)
at Object..js (module.js:410:10)
at Module.load (module.js:336:31)
at Function._load (module.js:297:12)
at Array. (module.js:423:10)
at EventEmitter._tickCallback (node.js:126:26)

I'm guessing that is related to the version of connect I have installed? I tried the npm install version and the github master version with no luck against 1.3.0.

Merge javascripts and stylesheets option

Add configuration to enable js/css files merging:

app.enable('merge javascripts');
app.enable('merge stylesheets');

When enabled, merge all files into one on server start.

ERR! failed to link bins,

npm info preinstall [email protected]
npm ERR! failed to link bins
npm ERR! install failed Error: ENOENT, No such file or directory '/usr/local/bin/[email protected]'
npm info install failed rollback

npm ERR! Error: ENOENT, No such file or directory '/usr/local/bin/[email protected]'
npm ERR! Report this entire log at http://github.com/isaacs/npm/issues
npm ERR! or email it to [email protected]
npm ERR! Just tweeting a tiny part of the error will not be helpful.
npm ERR! System Linux 2.6.35-27-generic
npm ERR! argv { remain: [],
npm ERR! argv cooked: [ 'install' ],
npm ERR! argv original: [ 'install' ] }
npm not ok

Устанавливал с git и с npm install express-on-railway. C sudo

Cannot call method 'push' of undefined

Have tried to create simple railway application and it worked. But when used "railway g scaffold post title content date:date published:boolean" console command and posts were created, going to new posts page (/posts/new), shows an error:

500 TypeError: ejs:3 1|

New post

2| >> 3| <% form_for(post, {action: path_to.posts, method: 'POST', id: "post_form"}, function (form) { %> 4| <%- partial('posts/form.ejs', {locals: {form: form, post: post}}) %> 5| <%- form.submit('Create post') %> or 6| <%- link_to('Cancel', path_to.posts) %> Cannot call method 'push' of undefined

Monogdb was running, I have checked that post instance is valid (id of post instance seems to be valid for mongodb)

Have looked through the list of issues and have found one about push, but it was about changes to server.js and won't work here.

more agnostic

Hi..would be nice than EoR will support others nosql(like couchdb)..do u have plans for future support?...

CSRF protection

Provide ability to switch on csrf protection in application controller.

SyntaxError: Unexpected string - When using generators with redis.

I stumbled across railwayjs and wanted to make a quick proof of concept app but it seems like something (maybe the coffee script generation?) is not working quite right. I issued the following commands:

rw init incoming.io --coffee --tpl jade --db redis
rw g crud user email password
rw s 3000 

and it threw this error:

SyntaxError: Unexpected string
    at Object.init (/usr/local/lib/node_modules/railway/lib/models.js:177:17)
    at Array.<anonymous> (/usr/local/lib/node_modules/railway/lib/onrailway.js:71:24)
    at EventEmitter._tickCallback (node.js:126:26)

Im on OSX lion with node 0.4.11.

Fast server startup

Railway loading takes up to 500ms now (mongo + few thin controllers + few fat models + extensions), but it can grow up in time.

Server can be started before the final completion of the initialization.

Locale issue (because of yaml.js)

If you don't terminate the yml locale files in config/locales with a newline, you get this error:

TypeError: Cannot read property '1' of undefined
  at Parser.expect (/usr/local/lib/node_modules/railway/node_modules/yaml/lib/yaml.js:179:51)
  at Parser.parseHash (/usr/local/lib/node_modules/railway/node_modules/yaml/lib/yaml.js:280:12)
  at Parser.parse (/usr/local/lib/node_modules/railway/node_modules/yaml/lib/yaml.js:239:19)
  at Parser.parseHash (/usr/local/lib/node_modules/railway/node_modules/yaml/lib/yaml.js:279:23)
  at Parser.parse (/usr/local/lib/node_modules/railway/node_modules/yaml/lib/yaml.js:239:19)
  at Object.eval (/usr/local/lib/node_modules/railway/node_modules/yaml/lib/yaml.js:381:46)
  at /usr/local/lib/node_modules/railway/lib/locales.js:24:28
  at Array.forEach (native)
  at Object.load (/usr/local/lib/node_modules/railway/lib/locales.js:18:25)
  at Object.init (/usr/local/lib/node_modules/railway/lib/locales.js:14:13)

See this issue for why: tj/js-yaml#13. Someone forked it and fixed the issue.

Unable to use Jade as a View engine

I'm just unable to use Jade as my View engine.

First I started by putting this in my environment file.
app.set('view engine', 'jade');

and my npmfile.js has this:

require('jade-ext');

I also ran npm install -l and verified that jade and jade-ext are installed in my app.
I also have jade versions of my layouts and views.

When I restart my server, the app cannot find any routes.
Cannot GET /snippets

The moment I change the "view engine" to "ejs" in my environment file and restart the server, everything works fine.

I also find the console logging somewhat limiting, for example I had to retrace a few steps to figure out what was causing this behavior.

Thanks for looking into it.

Generic routes

Add ability to use generic routing:

map.get(':controller/:action');

Observers in app/observers/*

Observer is a kind of controller, that listen for some event in the system, for example: paypal, twitter or facebook observers listens for callback from foreign service. Email observer may listen some events related to emails.

If you need app.on('someEvent') you should place this code here.

How does csrf protection works

For some reason I am getting Forbidden everytime I try to submit my form, and in the log I see the "Incorrect authencity token" I think the token is not getting submitted to the POST request, any ideas I might be missing something here but not sure what it is.

I do see thsi in my page head section:

<meta name="csrf-param" content="authencity_token" />
<meta name="csrf-token" content="7752ef5547646924ff5f56edc63893fc15cff2ff" />

Thank you in advance for the help!

JB

Blank model files

Hi, when running your example the model file is created, but it is blank:

railway g model user email password approved:boolean

freebsd express-on-railway blog example run problem

it fails with mongoose, but why?

verbose install log: https://gist.github.com/1274854

$ rw s 8888
Railway server listening on port 8888 within development environment

/usr/home/casper/Desktop/railwaytest/blog/node_modules/railway/lib/datamapper/mongoose.js:25
exports.prepareContext = function (context, export) {
^^^^^^
WARNING: Could not load orm driver mongoose

SyntaxError:
at Module._compile (module.js:406:25)
at Object..js (module.js:417:10)
at Module.load (module.js:343:31)
at Function._load (module.js:302:12)
at require (module.js:355:19)
at Object.init (/usr/home/casper/Desktop/railwaytest/blog/node_modules/railway/lib/models.js:143:22)
at Array.1 (/usr/home/casper/Desktop/railwaytest/blog/node_modules/railway/lib/onrailway.js:71:24)
at EventEmitter._tickCallback (node.js:126:26)

Generators API

Provide way to describe each generator: usage, example.

models support, mysql

find только по primaryKey читает? Как, например, получить все по date DESC, LIMIT 10, 20 или с WHERE date < 123?

errors Models.js

  1. Models.js : fs.readFileSync(app_root + '/config/database.json','utf-8')) Кодировка иначе Buffer. https://github.com/1602/express-on-railway/blob/master/lib/models.js#L125
  2. Models.js:
    https://github.com/1602/express-on-railway/blob/master/lib/models.js#L125
    Что если заменить на
    https://gist.github.com/852634

По-моему, если будет ошибка в файле fileModel, то выдаст в консоль путь к файлу.
А так запустил под 0.4.0 и вроде работает, но сгенерированная model выглядит по другому(README.md нет описания), поэтому model не проверял))
var User = describe("User", function () {

});

И еще вопрос, на нём можно будет писать уже проекты?

connect-mongodb: Cannot call method 'findOne' of null

setup a new project, and get this error

TypeError: Cannot call method 'findOne' of null
at MongoStore.get (/Users/sunchen/works/hana/node_modules/connect-mongodb/lib/connect-mongodb.js:95:15)
at Object.session as handle
at next (/Users/sunchen/works/hana/node_modules/connect/lib/http.js:198:15)
at Object.cookieParser as handle
at next (/Users/sunchen/works/hana/node_modules/connect/lib/http.js:198:15)
at Object.bodyParser as handle
at next (/Users/sunchen/works/hana/node_modules/connect/lib/http.js:198:15)
at /Users/sunchen/works/hana/node_modules/connect/lib/middleware/static.js:142:11

when browse something like "http://localhost:3000/docs/new"

i know the problem is coming from connect-mongodb 1.0.0, but it realy drive me crazy@@

the error gone when i using connect-mongodb 0.4

Error: No satisfying version found for 'mime'@'>=0.0.0 <1.0.0'

New node installation on ubuntu 11.10

$ node -v
v0.4.9

$ npm -v
0.2.19

Installation option 1 throws:
$ npm install -g
npm ERR! Error: No satisfying version found for 'mime'@'>=0.0.0 <1.0.0'
npm ERR! Valid install targets for mime: "latest", "1.0.0", "1.1.0", "1.2.1", "1.2.2", "1.2.3", "1.2.4"
npm ERR! at /usr/share/npm/lib/install.js:146:29
npm ERR! at /usr/share/npm/lib/install.js:181:5
npm ERR! at /usr/share/npm/lib/utils/registry/get.js:55:5
npm ERR! at /usr/share/npm/lib/utils/registry/request.js:36:10
npm ERR! at IncomingMessage. (/usr/share/npm/lib/utils/registry/request.js:173:14)
npm ERR! at IncomingMessage.emit (events.js:81:20)
npm ERR! at HTTPParser.onMessageComplete (http.js:133:23)
npm ERR! at Client.onData as ondata
npm ERR! at Client._onReadable (net.js:683:27)
npm ERR! at IOWatcher.onReadable as callback
npm ERR! Report this entire log at http://github.com/isaacs/npm/issues
npm ERR! or email it to [email protected]
npm ERR! Just tweeting a tiny part of the error will not be helpful.
npm not ok

Installation option 2 throws the same

with sudo ?
npm ERR! sudon't!
npm ERR! sudon't! Running npm as root is not recommended!
npm ERR! sudon't! Seriously, don't do this!
npm ERR! sudon't!
is installation instruction correct?

break into components

in the same way you're breaking out the db layer into jugglingdb, it'd be really amazing if some of the other components were isolated into their own modules.

For example:

the initialisation stuff like loading environment/config/i18n/initialisers would be useful on it's own.
as would the routing/controller system on it's own
generators (eg, ability to create generators for other projects (which is sorely missing btw))
etc

This also might help adoption, since it means that people don't feel like their entire app depends on someone else's code, instead components could be plugged in and out (eg, perhaps they want to use express-resource instead of your routes for some reason)

Just an idea.

Unnecessary suffix on controllers and helpers?

All controllers and helpers ends with _controller and _helper, is there any advantage of this method?

They are already separated by being in their own folders, and it just seems to make the filename longer.

ERR! Not compatible with your version of node/npm

Tried installing using:

$ sudo npm install railway -g

Got this error msg:

npm ERR! error installing [email protected] Error: Unsupported
npm ERR! error installing [email protected] at checkEngine (/usr/local/lib/node_modules/npm/lib/install.js:449:14)
npm ERR! error installing [email protected] at nextStep (/usr/local/lib/node_modules/npm/lib/utils/chain.js:54:8)
npm ERR! error installing [email protected] at chain (/usr/local/lib/node_modules/npm/lib/utils/chain.js:27:3)
npm ERR! error installing [email protected] at installOne (/usr/local/lib/node_modules/npm/lib/install.js:416:3)
npm ERR! error installing [email protected] at /usr/local/lib/node_modules/npm/lib/install.js:358:9
npm ERR! error installing [email protected] at /usr/local/lib/node_modules/npm/lib/utils/async-map.js:57:35
npm ERR! error installing [email protected] at Array.forEach (native)
npm ERR! error installing [email protected] at /usr/local/lib/node_modules/npm/lib/utils/async-map.js:57:11
npm ERR! error installing [email protected] at Array.forEach (native)
npm ERR! error installing [email protected] at asyncMap (/usr/local/lib/node_modules/npm/lib/utils/async-map.js:56:8)
npm ERR! Unsupported
npm ERR! Not compatible with your version of node/npm: [email protected]
npm ERR! Required: {"node":"0.4.x"}
npm ERR! Actual: {"npm":"1.0.6","node":"v0.5.0-pre"}
npm ERR!
npm ERR! System Linux 2.6.16-xenU
npm ERR! command "node" "/usr/local/bin/npm" "install" "railway" "-g"
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/node/npm-debug.log
npm not ok

Please let me know what I need to do to get Railway working with the latest version of NodeJS
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.