coming across this errors after initalizing a compound 1.1.7-4 project
6| != javascriptIncludeTag('https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js', 'rails', 'application')
7| != csrfMetaTag()
8| body
9| .navbar
Object # has no method 'tag'
same goes for csrfMetaTag() helper
Not confirmed. Everything is fine on 1.1.7-9
Sep 30
'13 11:09
1602
Kindly have a look before dismissing this. On a freshly generated Compound 1.1.7-9 with Coffeescript and Jade the following helpers on "application_layout" cause a fatal error.
!= javascriptIncludeTag
!= csrfMetaTag()
!= contentFor('javascripts')
I've created a clean-slate demo for this, you can see the "no_error_layout" will pass while "application_layout" will fail, on the "demo" controller.
https://github.com/sagish/clean-slate-compound-coffee-1179
https://github.com/sagish/clean-slate-compound-coffee-1179/blob/master/app/controllers/demo_controller.coffee
https://github.com/sagish/clean-slate-compound-coffee-1179/blob/master/app/views/layouts/application_layout.jade
https://github.com/sagish/clean-slate-compound-coffee-1179/blob/master/app/views/layouts/no_error_layout.jade
this is the error stack:
Sun Oct 06 2013 13:46:50 GMT+0300 (IDT)
GET /demo controller: demo action: index
perform protect from forgery
<<< protect from forgery [0 ms]
perform index
TypeError: /Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/app/views/layouts/application_layout.jade:6
4| title= title
5| != stylesheetLinkTag('bootstrap', 'application', 'bootstrap-responsive')
6| != javascriptIncludeTag('https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js', 'rails', 'application')
7| != csrfMetaTag()
8| body
9| .navbar
Object # has no method 'tag'
at HelperSet.javascriptIncludeTag (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/compound/lib/helpers.js:196:30)
at Array.forEach (native)
at javascriptIncludeTag (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/compound/lib/helpers.js:192:42)
at eval (:25:33)
at exports.compile (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/jade/lib/jade.js:153:35)
at Object.exports.render (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/jade/lib/jade.js:197:10)
at Object.exports.renderFile (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/jade/lib/jade.js:233:18)
at View.exports.renderFile as engine
at View.render (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/express/lib/view.js:76:8)
at Function.app.render (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/express/lib/application.js:506:10)
at ServerResponse.res.render (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/express/lib/response.js:798:7)
at Controller.renderView (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/compound/lib/controller-extensions.js:156:18)
at Controller.render.calcParams.view (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/compound/lib/controller-extensions.js:84:14)
at View.exports.renderFile as engine
at View.render (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/express/lib/view.js:76:8)
at Function.app.render (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/express/lib/application.js:506:10)
at ServerResponse.res.render (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/express/lib/response.js:798:7)
at Controller.renderView (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/compound/lib/controller-extensions.js:154:18)
at Controller.render (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/compound/lib/controller-extensions.js:79:10)
at Object.eval (:6:12)
at Array.FlowControl.call.collection.forEach.queue.push.ctl.context.inAction as 2
at ActionContext.run as innerNext
at Controller.BaseController.next (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/compound/node_modules/kontroller/lib/base.js:107:22)
at Controller.protectFromForgery (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/compound/node_modules/kontroller/lib/helpers.js:79:21)
at Object.eval (:4:12)
at Array.FlowControl.call.collection.forEach.queue.push.ctl.context.inAction as 1
at run (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/compound/node_modules/kontroller/lib/flow-control.js:103:31)
at Array.FlowControl.call.action as 0
at run (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/compound/node_modules/kontroller/lib/flow-control.js:103:31)
at FlowControl.call.compiledAction.(anonymous function) (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/compound/node_modules/kontroller/lib/flow-control.js:90:9)
at Controller.call (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/compound/node_modules/kontroller/lib/flow-control.js:49:16)
at Controller.call (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/compound/node_modules/kontroller/lib/flow-control.js:93:10)
at Controller.perform (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/compound/node_modules/kontroller/lib/flow-control.js:18:10)
at ControllerBridge.callControllerAction (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/compound/lib/controller-bridge.js:169:9)
at ControllerBridge.uniCaller (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/compound/lib/controller-bridge.js:149:14)
at callbacks (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/express/lib/router/index.js:164:37)
at param (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/express/lib/router/index.js:138:11)
at pass (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/express/lib/router/index.js:145:5)
at Router._dispatch (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/express/lib/router/index.js:173:5)
at Object.router (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/express/lib/router/index.js:33:10)
at next (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at Object.methodOverride as handle
at next (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at store.get.next (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/express/node_modules/connect/lib/middleware/session.js:312:9)
at /Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/express/node_modules/connect/lib/middleware/session.js:329:9
at /Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/express/node_modules/connect/lib/middleware/session/memory.js:55:7
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
<<< index [509 ms]
Rendered demo/index using layout layouts/application_layout in 510ms
http.js:645
throw new Error('Can't set headers after they are sent.');
^
Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (http.js:645:11)
at ServerResponse.res.setHeader (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/express/node_modules/connect/lib/patch.js:59:22)
at module.exports.error.message (/Users/Sagi/Dev/opensource/clean-slate-compound-coffee-1179/node_modules/express/node_modules/connect/lib/middleware/errorHandler.js:63:17)
at fs.readFile (fs.js:176:14)
at Object.oncomplete (fs.js:297:15)
Yep, it's latest jade issue.
Oct 07
'13 09:10
1602