Loading...

WellRailed@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

[WellRailed] Re: Improving the precompile experience Jared Armstrong Sun Mar 25 20:00:29 2012

When the time comes when things are on fire and you have to deploy an
urgent patch -- having a deploy that only takes a couple of seconds
can be pretty valuable.

My position is that assets should only be precompiled if there are
changes affecting assets since the last deploy. Here's a Capistrano
deploy.rb snippet that checks this: https://gist.github.com/2202542

Personally, I'm indifferent on whether this should be done client-side
or server side. Arguably, you save CPU cycles precompiling from a
single location if you have multiple frontend servers... but other
than that it should take the same elapsed time (probably less, if you
have a decent server) whether you do it before or during a deploy.
That is, you still have to wait till your assets precompile before you
can deploy whether or not you do it server(s) or locally.

Jared

On Mar 17, 8:07 pm, Matt Powell <[EMAIL PROTECTED]> wrote:
> Me too :)
>
>
>
>
>
>
>
> On Saturday, 17 March 2012 at 6:06 PM, Nahum Wild wrote:
> > I'd rather have a slow deploy.
>
> > --nahum
>
> > On Sat, Mar 17, 2012 at 16:33, Matt Powell <[EMAIL PROTECTED] 
> > (mailto:[EMAIL PROTECTED])> wrote:
> > > It's simple enough to write a pre-commit hook that scans a changelog, 
> > > compares mtimes with compiled assets, and runs a rake task if the results 
> > > are found wanting.
>
> > > M
>
> > > On Saturday, 17 March 2012 at 1:04 PM, nahum wrote:
>
> > > > How do you ensure that you don't forgot to pre-compile your assets? IE 
> > > > prevent a deployment with the wrong/old assets?
>
> > > > --nahum
>
> > > > On Saturday, 17 March 2012 09:24:21 UTC+13, Richard Hulse wrote:
> > > > > For those who might not have seen it, I have written a blog post 
> > > > > about getting rid of precompile on the production server.
>
> > > > > In a nutshell, you precompile and commit locally, and change a couple 
> > > > > of settings in your dev config to NOT serve those compiled assets 
> > > > > (which is the default), but still use Sprockets. That means you only 
> > > > > have to compile (and commit) when you change something, and the 
> > > > > deploy is much faster.
>
> > > > > If you are anything like me, I tend to code in phases. If I am 
> > > > > working on features with no asset or Gem changes, and deploying 
> > > > > often, it is nice to have the deploy speed back to what it was before 
> > > > > Rails 3!
>
> > > > >http://richardhulse.blogspot.co.nz/2012/03/rails-how-to-compile-and-c...
>
> > > > > Cheers,
> > > > > Richard
>
> > > > --
> > > > You received this message because you are subscribed to the Google 
> > > > Groups "WellRailed" group.
> > > > To view this discussion on the web 
> > > > visithttps://groups.google.com/d/msg/wellrailed/-/eIZDf8q1jKIJ.
> > > > To post to this group, send email to [EMAIL PROTECTED] (mailto:[EMAIL 
> > > > PROTECTED]).
> > > > To unsubscribe from this group, send email to [EMAIL PROTECTED] 
> > > > (mailto:[EMAIL PROTECTED]).
> > > > For more options, visit this group 
> > > > athttp://groups.google.com/group/wellrailed?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "WellRailed" group.
> > > To post to this group, send email to [EMAIL PROTECTED] (mailto:[EMAIL 
> > > PROTECTED]).
> > > To unsubscribe from this group, send email to [EMAIL PROTECTED] 
> > > (mailto:[EMAIL PROTECTED]).
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/wellrailed?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "WellRailed" group.
> > To post to this group, send email to [EMAIL PROTECTED]
> > To unsubscribe from this group, send email to [EMAIL PROTECTED]
> > For more options, visit this group 
> > athttp://groups.google.com/group/wellrailed?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"WellRailed" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/wellrailed?hl=en.