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

Page contents rendered inside <script> and cake watch not working #397

Closed deepanshumehndiratta closed 10 years ago

deepanshumehndiratta commented 11 years ago

Finally after spending 3 days to get the Tower Installation working, I'm experiences these errors:

  1. The Page body output is wrapped inside a script tag. Can some one tell me how to get around this. I searched in template files but couldn't find anything useful.

Also, the following is rendered as such.

{{action showRoot href=true}}

And accessing any stylesheet or script renders the following output:

No path matches /stylesheets/vendor/stylesheets/bootstrap/bootstrap.css
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Mass Downloader</title>
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <meta name="robots" content="noodp,noydir,index,follow" />
    <meta name="author" content="username" />
    <meta name="csrf-token" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <link rel="stylesheet" href="/stylesheets/vendor/stylesheets/bootstrap/bootstrap.css" />
    <link rel="stylesheet" href="/stylesheets/vendor/stylesheets/prettify.css" />
    <link rel="stylesheet" href="/stylesheets/app/stylesheets/client/application.css" />
    <link href="/favicon.png" rel="icon shortcut-icon favicon" />
    <script>window.ENV                  = {};
ENV.VIEW_PRESERVES_CONTEXT  = true;
ENV.CP_DEFAULT_CACHEABLE    = true;</script>
  </head>
  <body role="application">
    <script type="text/x-handlebars" data-template-name="application">
      <nav id="navigation" class="navbar" role="navigation">
        <div class="navbar-inner">
          <div class="container">
            <a class="brand" {{action showRoot href=true}}>
              Mass Downloader
            </a>
            <div class="nav-collapse">
              <ul class="nav">
              </ul>
              <ul class="nav pull-right">
                <li class="dropdown">
                  <a class="dropdown-toggle" data-toggle="dropdown" href="#" title="Docs">Docs</a>
                  <ul class="dropdown-menu">
                    <li>
                      <a href="https://github.com/viatropos/tower/wiki" title="Tower.js">Tower.js</a>
                    </li>
                  </ul>
                </li>
              </ul>
            </div>
          </div>
        </div>
      </nav>
      <header id="header" class="header" role="banner">
        <div class="container">
          <h1 id="title">
            Mass Downloader
          </h1>
        </div>
      </header>
      <section id="flash" role="banner">
        <div class="container">
        </div>
      </section>
      <section id="content" role="main">
        <div class="container">
{{outlet}}
          <aside id="sidebar" role="complementary">
          </aside>
        </div>
      </section>
      <footer id="footer" class="footer" role="contentinfo">
        <div class="container">
          <cite class="copyright">
            <span>&copy;</span>
            <a href="mailto:deepanshumehndiratta@gmail.com">
              username
            </a>
            <span>2013.</span>
          </cite>
        </div>
      </footer>
    </script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script src="/javascripts/vendor/javascripts/underscore.js"></script>
    <script src="/javascripts/vendor/javascripts/underscore.string.js"></script>
    <script src="/javascripts/vendor/javascripts/moment.js"></script>
    <script src="/javascripts/vendor/javascripts/geolib.js"></script>
    <script src="/javascripts/vendor/javascripts/validator.js"></script>
    <script src="/javascripts/vendor/javascripts/accounting.js"></script>
    <script src="/javascripts/vendor/javascripts/inflection.js"></script>
    <script src="/javascripts/vendor/javascripts/async.js"></script>
    <script src="/javascripts/vendor/javascripts/socket.io.js"></script>
    <script src="/javascripts/vendor/javascripts/handlebars.js"></script>
    <script src="/javascripts/vendor/javascripts/ember.js"></script>
    <script src="/javascripts/vendor/javascripts/jstorage.js"></script>
    <script src="/javascripts/vendor/javascripts/tower.js"></script>
    <script src="/javascripts/vendor/javascripts/bootstrap/bootstrap-dropdown.js"></script>
    <script src="/javascripts/vendor/javascripts/mocha.js"></script>
    <script src="/javascripts/vendor/javascripts/chai.js"></script>
    <script src="/javascripts/test/client.js"></script>
    <script src="/javascripts/app/config/shared/application.js"></script>
    <script src="/javascripts/app/config/client/bootstrap.js"></script>
    <script src="/javascripts/app/config/client/watch.js"></script>
    <script src="/javascripts/app/config/shared/routes.js"></script>
    <script src="/javascripts/app/controllers/client/applicationController.js"></script>
    <script src="/javascripts/templates.js"></script>
    <script src="/javascripts/app/views/client/layout/application.js"></script>
    <script>App.bootstrap({})</script>
  </body>
</html>

Also, starting cake watch throws the following error:

cake watch

/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:115
    throw new Error("Cakefile not found in " + (process.cwd()));
          ^
Error: Cakefile not found in /works/deepanshu/Desktop/Dev/mass-downloader1
    at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:115:11)
    at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:113:14)
    at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:113:14)
    at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:113:14)
    at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:113:14)
    at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:113:14)
    at Object.exports.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:53:19)
    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)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:245:9)
deepanshu@Dell:~/Desktop/Dev/mass-downloader$ cake watch

/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:115
    throw new Error("Cakefile not found in " + (process.cwd()));
          ^
Error: Cakefile not found in /works/deepanshu/Desktop/Dev/mass-downloader1
    at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:115:11)
    at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:113:14)
    at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:113:14)
    at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:113:14)
    at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:113:14)
    at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:113:14)
    at Object.exports.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:53:19)
    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)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:245:9)
deepanshumehndiratta commented 11 years ago

The page content was finally rendered after removing:

script type: 'text/x-handlebars', 'data-template-name': 'application', ->

From app/templates/server/layout/application.coffee

Although, the 'javascripts' and 'stylesheets' folder inside public directory are empty, because of which no scripts or stylesheets are being loaded. Anyway to cure this?

Also, cake watch gives the following error:

cake watch
path.existsSync is now called `fs.existsSync`.
>> Npm module "grunt-contrib-stylus" not found. Is it installed?
Default database not set, using Memory store
<WARN> Task "stylus" not found. Use --force to continue. </WARN>

Aborted due to warnings.
jmtoball commented 11 years ago

Same here. I would have expected the initial app code and the stuff generated by scaffold to work as is. Node: 0.8.23 Tower: 0.4.2-25

What I did:

$ tower new test $ npm install $ node server

server is running and serving, but the html output is in the handlebars-scripttag and no stylesheets or javascripts are served.

edubkendo commented 11 years ago

@deepanshumehndiratta @jmtoball Tower is being completely rebuilt for version 0.5.0, This is being very actively/aggressively developed from my understanding, though mostly being done behind-the-scenes . There will be an entirely new site, new docs, better build process, clean install process, etc.

As it stands, this current version of Tower has many issues with its dependencies, especially grunt, which is why you two are experiencing these problems. If you look through the issues, a number of people have developed workarounds for these issues which may or may not work for you. My advice though: just wait on 0.5.0. It will be a pretty dramatic change from everything I've been told, faster, cleaner, more modular, and with a dramatically simplified API.

I'm not currently developing with Tower, but your messages showed up in my inbox and I thought I'd take a moment to try to spare you the pain of continuing to be frustrated with this.

edubkendo commented 11 years ago

@viatropos @TheHydroImpulse how about officially deprecating this version of Tower, with a big warning on the Readme and on the oldsite that explains the current situation. Something in big, bold letters that will grab attention and a link to direct them to somewhere they can watch for news about 0.5? These dependency issues are only going to get worse.

thehydroimpulse commented 11 years ago

@edubkendo Yeah, I've noticed that more and more problems are arising. I'll see what I can do.

btbinhtran commented 11 years ago

@TheHydroImpulse Delegate us work if you can. To clarify, the new Tower github url is at https://github.com/tower

It's actually a user named Tower with multiple repositories being the separate components of tower. Is that how we want to go about this? I was under the impression we would have a user tower with one main repository named tower containing the separate components. This would make it easier for contributors to track one repository.

What am I missing?

thehydroimpulse commented 11 years ago

@edubkendo @btbinhtran I'll talk with @viatropos and see how we want to organize this. Yes, that's where tower 0.5.0 is being held at. We wanted to keep it under a tight lid while we did most of the development. We were originally going to go with a single repository and we previously discussed splitting it up into smaller modules but decided not to. We came to the conclusion that separating Tower into small modules was a much easier way to work and created a more organized environment. This does create a bit of work if you want to work on multiple modules locally as you need to link all of them using npm but once your environment is setup, it only gets better. We opted for a component and npm workflow. Component is used for managing client-side modules and npm for server-side.

This model works incredibly well and provides independent, testable modules. We are also no longer using any globals and work with a more functional, chain-able API.

I do feel like contributing will be decentralized but it will make it easier (I think) for people to contribute right away. Previously, you had to really dig deep into the source code and everything was tied together. This new model allows people to work exclusively on specific modules without touching any other ones.

Also, there will be a repo under tower/tower which will be the main repository. All issues will most likely be placed under this repo for anything Tower related. We'll be transferring the current tower repo over to the organization. All commits and contributions will also be transfered and not lost.

If you have any questions, just let me know.

thehydroimpulse commented 11 years ago

Added a bit of info to my last comment.

mfjohansson commented 11 years ago

Sorry for asking in this issue thread, but I wonder if there is somewhere I can read on about v0.5, like when it's expected to be released etc? I've seen a roadmap here in this repo, but is that up to date?

thehydroimpulse commented 11 years ago

@mfjohansson no worries. That roadmap is outdated. I don't want to spoil everything just yet but I'll enlighten you on some of the things happening.

When is it going to be released? We haven't put a date on the release yet.

0.5.0 is a complete rewrite from 0.4.x. Why? Because were now operating in pure JavaScript as a basis instead of CoffeeScript. We went for a more modular approach with more than 50+ modules comprising Tower. We will be releasing a lot more information when were close to the release of Tower with proper documentation.

mfjohansson commented 11 years ago

Thanks for your response. I think that (without having any experience with this particular project) most open source projects needs a rewrite after a few releases since they quite often go through big changes in direction. So it's probably a clever decision.

I wondered because I'm currently evaluating a few node MVC frameworks and fell for tower just by looking at the documentation. Since I have the same problems as discussed in this issue and can't get a tower-app to run, I'm eager to get a glance at the next version. I understand that you don't want to build any expectations, but is there some kind of plan for when there'll be an update (e.g. before summer or even this year)?