Ruby on Rails Monday, November 28, 2011

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7TadcACgkQW6QSU1GdvawJyACfaLprCjw0FmnIVo3btyRvXOp0
vPIAoLKPPiXLM5jw+9i8p2fPW6rvaUB0
=7Jx7
-----END PGP SIGNATURE-----
Am 28.11.2011 10:41, schrieb Somnath Mallick:
> Thanks, your path worked. But seems a bit strange. That the paths
> mentioned in the tutorial and the actual path would vary so much, just
> because i am just a few versions up the ladder.

With the introduction of the asset-pipeline the behaviour of
stylesheet_link_tag changed. This is what makes it incompatible, same is
for the corresponding javascript and image helpers.

In 3.0 and before, the helpers were wired to /public/stylesheets (or
images, javascripts) and you had to place a copy of your css there.

Now with 3.1 and the introduction of the assetpipeline there were changes.

All helpers now create a reference to "/assets/<filename>". You can
either put static assets there, or the recommended way, put your assets
in the corresponding folder under /app/assets/.

The big advantage of this way is, that you can have stylesheets or
javascript in a template or alternative language like less, sass or scss
for styles or coffeescript for javascript.

Theoretically you could even drop your stylesheets in brainfuck[1] if
someone provides a gem that processes the brainfuck document.

The disadvantage on the other hand: People following 3.0 tutorials on a
3.1 environment, asking themself "Why doesnt that work? I using rails
3!" But not realizing the change in the minor version number, since in
many heads a change in minor still means "compatibility"

I hope this short excurse is helping you to get over your problems.

Bye
Norbert

PS: Please use quoting in the future and quote the parts of the message
you are refering to, this would make following the conversation easier.

[1]: http://en.wikipedia.org/wiki/Brainfuck

No comments:

Post a Comment