tower-archive / tower

UNMAINTAINED - Small components for building apps, manipulating data, and automating a distributed infrastructure.
http://tower.github.io
MIT License
1.79k stars 120 forks source link

How do I actually start my application? Freshly generated app #357

Closed ragulka closed 11 years ago

ragulka commented 11 years ago

I just generated a simple app (pretty much the same as shown on http://towerjs.org/)

I tried to start it with node server.js - but it turned out that I had to do npm install before (that should be in the documentation).

Now I can start the app, but when I visit my app with my browser, I cannot see anything. When I look at the source, I can see all sorts of js and css files being included. However, when I try to open any of them, I see this:

No path matches /javascripts/app/models/user.js.js

(Is it supposed to have .js.js (two times) in the end?)

It seems that I am obviously missing some kind of build step that actually creates these .js and .css files, but running any of the Cake commands shown in the guide won't do anything.

Is there a simple step-by-step guide somewhere?

edubkendo commented 11 years ago

@ragulka Sorry you ran into this. Some of the information on the website http://towerjs.org is quite outdated. The most updated information is in the README.md and the wiki where there is in fact a Beginner's Guide. You might also check out the tutorial on my blog, Build Your Own Towerbot. It should carry you a long way.

ragulka commented 11 years ago

@edubkendo thanks, that is a much better guide, although I am stuck at cake watch - I get an error saying:

/Library/WebServer/Documents/tests/testapp/node_modules/which/which.js:83
  throw new Error("not found: "+cmd)
        ^
Error: not found: grunt
    at whichSync (/Library/WebServer/Documents/tests/testapp/node_modules/which/which.js:83:9)
    at spawnGrunt (/Library/WebServer/Documents/tests/testapp/Cakefile:20:13)
    at Object.Tower.ApplicationAssets.bundle.minify [as action] (/Library/WebServer/Documents/tests/testapp/Cakefile:33:12)
    at helpers.extend.invoke (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:42:26)
    at Object.exports.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:67:21)
    at Object.<anonymous> (/usr/local/lib/node_modules/coffee-script/bin/cake:7:38)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

I did run npm install

ragulka commented 11 years ago

Ah, got it. I had to install grunt using npm install grunt -g before running cake watch.

edubkendo commented 11 years ago

Glad you're up and running, just let us know if you run into anything else. You can also always stop by the chat, #towerjs on irc.freenode.net , and someone will try to help you if possible. I often leave it running, even if I'm away from the keyboard, so I may not see your question right away but will try to get to it when I can.

ghost commented 11 years ago

Still experiencing this issue, installed grunt -g before running cake watch but

root@ps:/home/me/app# cake watch

/home/me/app/node_modules/which/which.js:83 throw new Error("not found: "+cmd) ^ Error: not found: grunt at whichSync (/home/me/app/node_modules/which/which.js:83:9) at spawnGrunt (/home/me/app/Cakefile:20:13) at Object.Tower.ApplicationAssets.bundle.minify as action at helpers.extend.invoke (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:44:26) at Object.exports.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:69:21) at Object. (/usr/local/lib/node_modules/coffee-script/bin/cake:7:38) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.runMain (module.js:497:10) at process._tickCallback (node.js:427:13)

thehydroimpulse commented 11 years ago

Make sure grunt's version isn't >=0.4.0 and that you can run it.

drnikki commented 11 years ago

So I'm just going to drop all of my errors so that someone else searching for it can find the answer (which is much easier than all of the steps I took). Intially, I had the same error as above.

The instructions here http://gruntjs.com/getting-started got grunt working for me, but then I ended up with

A valid Gruntfile could not be found. Please see the getting started guide for
more information on how to configure grunt: http://gruntjs.com/getting-started
Fatal error: Unable to find Gruntfile.

But that happened because, grunt was the lateset version. See: https://github.com/viatropos/tower/issues/390

npm install grunt@0.3.17 -g 

worked until I ended up with:

Running "less:bootstrap" (less) task

TypeError: Object #<Object> has no method 'options'
    at Object.module.exports.grunt.util._.extend.filename (/Users/nikki/work/ikenga/node_modules/grunt-contrib-less/tasks/less.js:24:24)
    at Object.task.registerMultiTask.thisTask (/usr/local/lib/node_modules/grunt/lib/grunt/task.js:109:15)
    at Object.task.registerTask.thisTask.fn (/usr/local/lib/node_modules/grunt/lib/grunt/task.js:58:16)
    at Task.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:343:36)
    at Task.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:319:9)
    at Task.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:346:11)
    at Task.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:319:9)
    at Task.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:346:11)
    at Task.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:319:9)
    at Task.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:346:11)
    at Task.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:319:9)
    at Task.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:346:11)
    at Task.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:319:9)
    at Task.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:346:11)
    at Task.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:319:9)
    at Task.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:346:11)
    at Task.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:319:9)
    at Task.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:346:11)
    at Task.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:319:9)
    at Task.<anonymous> (/usr/local/lib/node_modules/grunt/lib/util/task.js:346:11)
    at Task.start (/usr/local/lib/node_modules/grunt/lib/util/task.js:359:5)
    at Object.grunt.tasks (/usr/local/lib/node_modules/grunt/lib/grunt.js:143:8)
    at Object.module.exports [as cli] (/usr/local/lib/node_modules/grunt/lib/grunt/cli.js:36:9)
    at Object.<anonymous> (/usr/local/lib/node_modules/grunt/bin/grunt:19:14)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

so THEN, I applied https://github.com/viatropos/tower/issues/375#issuecomment-12204491, but that didn't work.

Next: https://github.com/viatropos/tower/issues/388. Using the full package.json file, but with the tower git URL as the tower source

    "tower": "git://github.com/viatropos/tower.git",

Then uninstall, and complete reinstall. Cake watch works fine now.

TLDR https://github.com/viatropos/tower/issues/388. Using the full package.json file, but with the tower git URL as the tower source

    "tower": "git://github.com/viatropos/tower.git",

uninstall; reinstall; go!

missinglink commented 11 years ago

The website examples are seriously out-of-date, impossible for new users to get started. Has the project been abandoned?

thehydroimpulse commented 11 years ago

@missinglink This project has not been abandoned just this version (0.4.x). Were working hard on 0.5.0 behind the scenes which is a complete rewrite of Tower in pure JavaScript. We'll be announcing the release when it's done and when all the documentation is top notch.

ghost commented 11 years ago

pretty much abandoned towerjs because I could not get started even using the solutions listed here and the outdated documentation. Maybe when 0.5.0 comes out I'll have a look but if you hadn't noticed Towerjs is not the only kid on the block.