I''ve tried to fix asset_packager (http://synthesis.sbecker.net/pages/ asset_packager) for Rails 2, but while doing this, it seems like I''m patching something that''s already built-in. Is asset_packager actually built into Rails 2? If so, how do I use it? Thanks, Helzer --~--~---------~--~----~------------~-------~--~----~ 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 To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
It''s automagically used in production mode. helzer wrote:> I''ve tried to fix asset_packager (http://synthesis.sbecker.net/pages/ > asset_packager) for Rails 2, but while doing this, it seems like I''m > patching something that''s already built-in. > > Is asset_packager actually built into Rails 2? > > If so, how do I use it? > > Thanks, > Helzer > > > >--~--~---------~--~----~------------~-------~--~----~ 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 To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
But, how do I use it? Right now (Rails 1.2.6), I have the config/asset_packages.yml list of packages and these two to instantiate the assets: <%= stylesheet_link_merged :base %> <%= javascript_include_merged :base %> What do I need to do with the built in Rails 2 asset packager? Doing the same, but just deleting the plugin/asset_packager didn''t help. --~--~---------~--~----~------------~-------~--~----~ 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 To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
cuong.tran-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Dec-02 16:42 UTC
Re: Asset packager for Rails 2
Just specify:
<%= javascript_include_tag :defaults, ''reflection.js'',
''...'', :cache => true %>
On Dec 1, 7:17 am, helzer
<amir.hel...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> But, how do I use it?
>
> Right now (Rails 1.2.6), I have the config/asset_packages.yml list of
> packages and these two to instantiate the assets:
> <%= stylesheet_link_merged :base %>
> <%= javascript_include_merged :base %>
>
> What do I need to do with the built in Rails 2 asset packager?
>
> Doing the same, but just deleting the plugin/asset_packager didn''t
> help.
--~--~---------~--~----~------------~-------~--~----~
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
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
> <%= javascript_include_tag :defaults, ''reflection.js'', > ''...'', :cache => true %>1) Using asset_packager, I had a rake task which created a single Javascript and single CSS file from the multiple JS, CSS files I use. It also compressed them. I ran this task when deploying. Do I need to do anything similar with the current scheme? 2) I have another environment, which I called ''sandbox''. This environment behaves exactly like the production environment (just with a different database). How should I tell Rails 2 to apply asset caching to this environment too? Thanks, Helzer --~--~---------~--~----~------------~-------~--~----~ 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 To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
cuong.tran-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Dec-03 08:28 UTC
Re: Asset packager for Rails 2
When :cache is true and ActionController::Base.perform_caching is true, all the javascript files are combined into one all.js (same with css files). However, the files are not compressed nor minified. On Dec 2, 6:42 pm, helzer <amir.hel...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > <%= javascript_include_tag :defaults, ''reflection.js'', > > ''...'', :cache => true %> > > 1) Using asset_packager, I had a rake task which created a single > Javascript and single CSS file from the multiple JS, CSS files I use. > It also compressed them. I ran this task when deploying. > Do I need to do anything similar with the current scheme? > > 2) I have another environment, which I called ''sandbox''. This > environment behaves exactly like the production environment (just with > a different database). How should I tell Rails 2 to apply asset > caching to this environment too? > > Thanks, > Helzer--~--~---------~--~----~------------~-------~--~----~ 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 To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---