Hi, I have a situation where a big piece of CoffeeScript / JS work is working well uncompressed but not when compressed in the asset pipeline. I''m wondering about strategory how to debug this, and currently if it''s possible to pass options to Uglifier from Rails configuration files? For example, I''d like to disable variable name changes and have only whitespace removed. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/jTaNONE2JRoJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Compressing a file should not be contributing to errors - it''s likely your production environment settings may have altered the environment enough to produce these errors. Could you describe the problem in a bit more detail so we can better guide you? On Apr 9, 8:03 am, Marko Anastasov <ma...-BO5q776bz8jWD+q4lUSnYw@public.gmane.org> wrote:> Hi, > > I have a situation where a big piece of CoffeeScript / JS work is working > well uncompressed but not when compressed in the asset pipeline. > > I''m wondering about strategory how to debug this, and currently if it''s > possible to pass options to Uglifier from Rails configuration files? For > example, I''d like to disable variable name changes and have only whitespace > removed.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marko Anastasov
2012-Apr-09 14:38 UTC
Re: Re: Debugging errors in asset pipeline-compressed JS
I have managed to isolate the application CS/JS from 3rd party libs, which are temporarily sourced from dropbox, and run the app locally in staging environment with manually precompiled assets. The problem is simply that there''s a JS exception logged during runtime that does not happen when I precompile with compress = false. The message is "a.onb is not defined", but I cannot find "a.onb" in the source code. What could be production/staging environment settings that might have side effects? On Monday, April 9, 2012 at 15:40 , Adam wrote:> Compressing a file should not be contributing to errors - it''s likely > your production environment settings may have altered the environment > enough to produce these errors. Could you describe the problem in a > bit more detail so we can better guide you? > > On Apr 9, 8:03 am, Marko Anastasov <ma...-BO5q776bz8jWD+q4lUSnYw@public.gmane.org (http://renderedtext.com)> wrote: > > Hi, > > > > I have a situation where a big piece of CoffeeScript / JS work is working > > well uncompressed but not when compressed in the asset pipeline. > > > > I''m wondering about strategory how to debug this, and currently if it''s > > possible to pass options to Uglifier from Rails configuration files? For > > example, I''d like to disable variable name changes and have only whitespace > > removed. > > > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marko Anastasov
2012-Apr-10 14:34 UTC
Re: Re: Debugging errors in asset pipeline-compressed JS
I have realized that minified JS does not work because mangled code broke some metaprogramming from my codeveloper. So right now I''m looking for a way to tell Uglifier to just strip whitespace, or ideally strip whitespace on certain files but mangle 3rd party libs. On Monday, April 9, 2012 4:38:02 PM UTC+2, Marko Anastasov wrote:> > I have managed to isolate the application CS/JS from 3rd party libs, which > are temporarily sourced from dropbox, and run the app locally in staging > environment with manually precompiled assets. > > The problem is simply that there''s a JS exception logged during runtime > that does not happen when I precompile with compress = false. The message > is "a.onb is not defined", but I cannot find "a.onb" in the source code. > > What could be production/staging environment settings that might have side > effects? > > > On Monday, April 9, 2012 at 15:40 , Adam wrote: > > > Compressing a file should not be contributing to errors - it''s likely > > your production environment settings may have altered the environment > > enough to produce these errors. Could you describe the problem in a > > bit more detail so we can better guide you? > > > > On Apr 9, 8:03 am, Marko Anastasov <ma...-BO5q776bz8jWD+q4lUSnYw@public.gmane.org ( > http://renderedtext.com)> wrote: > > > Hi, > > > > > > I have a situation where a big piece of CoffeeScript / JS work is > working > > > well uncompressed but not when compressed in the asset pipeline. > > > > > > I''m wondering about strategory how to debug this, and currently if it''s > > > possible to pass options to Uglifier from Rails configuration files? > For > > > example, I''d like to disable variable name changes and have only > whitespace > > > removed. > > > > > > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/8IXsd_UAXgMJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Walter Lee Davis
2012-Apr-11 02:21 UTC
Re: Re: Debugging errors in asset pipeline-compressed JS
On Apr 10, 2012, at 10:34 AM, Marko Anastasov wrote:> I have realized that minified JS does not work because mangled code broke some metaprogramming from my codeveloper. So right now I''m looking for a way to tell Uglifier to just strip whitespace, or ideally strip whitespace on certain files but mangle 3rd party libs.Try running JSLint against the non-minified code, and fix any errors it points out to you. Minification cannot break properly formatted JavaScript. Walter> > On Monday, April 9, 2012 4:38:02 PM UTC+2, Marko Anastasov wrote: > I have managed to isolate the application CS/JS from 3rd party libs, which are temporarily sourced from dropbox, and run the app locally in staging environment with manually precompiled assets. > The problem is simply that there''s a JS exception logged during runtime that does not happen when I precompile with compress = false. The message is "a.onb is not defined", but I cannot find "a.onb" in the source code. > > What could be production/staging environment settings that might have side effects? > > > On Monday, April 9, 2012 at 15:40 , Adam wrote: > > > Compressing a file should not be contributing to errors - it''s likely > > your production environment settings may have altered the environment > > enough to produce these errors. Could you describe the problem in a > > bit more detail so we can better guide you? > > > > On Apr 9, 8:03 am, Marko Anastasov <ma...-BO5q776bz8jWD+q4lUSnYw@public.gmane.org (http://renderedtext.com)> wrote: > > > Hi, > > > > > > I have a situation where a big piece of CoffeeScript / JS work is working > > > well uncompressed but not when compressed in the asset pipeline. > > > > > > I''m wondering about strategory how to debug this, and currently if it''s > > > possible to pass options to Uglifier from Rails configuration files? For > > > example, I''d like to disable variable name changes and have only whitespace > > > removed. > > > > > > > > > > > > > > > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/8IXsd_UAXgMJ. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.