开发者

Jammit does not loads assets

I'm developing the web site using Aptana 2.04.

When i say "script/server" from the project folder, everything is ok

After copying the project folder to another place, and saying "script/server", server starts, but jammit does't loads the packaged assets and i see the web page without any css and js files loaded.

I played a little with this problem, and found following:

  • When i say "jammit" from the non-copied folder, it packages the assets.
  • When i say "jammit" from the copied folder, i get an error "Jammit Warning: No assets match" for each .js and .css file

Whats wrong here ? Help !


Update 1

I refer to each asset in "assets.yml" in follwing way:

javascripts:
  common:
    - my_styles.css

my_styles.css are in "public/assets" folder.

I also tried "- public/assets/my_styles.css", but it does't work


Update 2

All works in production and developm开发者_如何学JAVAent modes, when i starting the server from my project folder.

But, when i just copy the project folder to some other place, i get the jammit errors. Two folders are the same byte by byte, but the behaviour is different. This is what confuses me ...


Doesn't look like you're referring to your assets properly -- Jammit will cache packaged assets into the public/assets folder -- the files shouldn't be in there to start with. Here's an example directory structure and assets.yml for you:

Directories:

public
  javascripts
    script1.js
    script2.js
    script3.js

assets.yml:

javascripts:
  common:
    - public/javascripts/*.js

Hope that helps you out. In development, you should see all scripts included as individual tag, and in production, you should see a single assets/common.js file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜