documentcloud / jammit

Industrial Strength Asset Packaging for Rails
http://documentcloud.github.com/jammit/
MIT License
1.16k stars 197 forks source link

Remove Java and YUI dependencies #189

Open evtuhovich opened 13 years ago

evtuhovich commented 13 years ago

Hello.

We use uglifier to minimize JS and compass to minimize CSS, so we do not need YUI (and so java) in our project.

But if YUI breaks on CSS-minimizing, it stops minimize JS, and this is bad.

This monkey patch fix this problem

sylvainsf commented 13 years ago

+1, yui segfaults in our production environment and we don't need/want CSS compression.

rapind commented 12 years ago

+1, would be nice to remove these dependencies for heroku deployments where you typically pre-compile / compress anyways (or package up to s3).

tjschuck commented 12 years ago

+1 -- if you're only minifying JS with uglifier, you shouldn't need YUI/Java.

sylvainsf commented 12 years ago

One note: The code in this pull request does not get rid of yui for CSS compression so if you're encountering the (incredibly bad) segfault bug with yui/open4 on Ubuntu this will not fix it.

tjschuck commented 12 years ago

@sylvainsf — That's ostensibly a bug with YUI then, not Jammit. Either way, it's a moot point on this issue, because this is specifically related to the bug of not wanting to use YUI at all. As it stands now, if you want to do CSS compression with Jammit, you need to use YUI.

evtuhovich commented 12 years ago

Yes, i've tried to remove YUI, but this is not very easy - a lot of YUI constants used all over the code. We have no java on production, only YUI gem, which doesn't work, but installed. This is not very clear solution, but "good enought". And this patch do not break or change existing functionality, it just give jammit possibility to work, when there is no java on the system.

tjschuck commented 12 years ago

@evtuhovich — Installing the yui-compressor gem did not fix this issue for me. Still fails with "Jammit Warning: Asset compression disabled -- Java unavailable."

tjschuck commented 12 years ago

@evtuhovich — Ah, I think I misread the end of your comment. You're saying installing the YUI gem and applying your patch fixes this, correct? I thought you meant just the non-working gem would be good enough to trick it into working.

evtuhovich commented 12 years ago

Yes, it write this to console but continue to work for me. And if you use YUI for javascript too (with use Uglifier), this may be a root of problem, i do not test it in such scenario.

On Fri, Jul 22, 2011 at 18:21, tjschuck < reply@reply.github.com>wrote:

@evtuhovich — Installing the yui-compressor gem did not fix this issue for me. Still fails with "Jammit Warning: Asset compression disabled -- Java unavailable."

Reply to this email directly or view it on GitHub: https://github.com/documentcloud/jammit/pull/189#issuecomment-1632033

evtuhovich commented 12 years ago

Yes, we use jammit with our patch on production. And i meant this is difficult to fully remove YUI gem dependencies from Jammit, so it installed in system, but not used at all.

Yes, with this patch Jammit starts to work in one additional case - our case. And this patch do not break any existing functionality.

evtuhovich commented 12 years ago

Sorry, i always think "Comment and Close" meant "Comment and Close Window" :-)

tcoulter commented 12 years ago

Hey guys, any chance we can get this merged? Running into segfaults with YUI and would love to use the latest jammit.