# Pre-generate assets in Rails 2.0

**URL:** <https://www.ruby-forum.com/t/pre-generate-assets-in-rails-2-0/138416>\
**Category:** Rails\
**Created:** [May 22, 2008, 8:19pm UTC](https://www.ruby-forum.com/t/pre-generate-assets-in-rails-2-0/138416 "2008-05-22T20:19:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fredrik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/cab0a1/32.png) [@Fredrik](https://www.ruby-forum.com/u/Fredrik)\
**Post date:** [May 22, 2008, 8:19pm UTC](https://www.ruby-forum.com/t/pre-generate-assets-in-rails-2-0/138416/1 "2008-05-22T20:19:04Z")

</div>

Is there any way to pre-generate the assets in Rails 2.0 instead of  
having them generated on the first request? (I’m referring to this  
behavior: \<%=stylesheet\_include\_tag, ‘test’, :cache =\> true %\>)

Thanks,  
-Fredrik

---

<div class="post-metadata">

**Author:** ![Fredrik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/cab0a1/32.png) [@Fredrik](https://www.ruby-forum.com/u/Fredrik)\
**Post date:** [May 23, 2008, 5:01pm UTC](https://www.ruby-forum.com/t/pre-generate-assets-in-rails-2-0/138416/2 "2008-05-23T17:01:25Z")

</div>

A little bump and some more background.

I’m trying to utilize this functionality along with the asset hosts?  
I’m assuming some people are using these two functions side by side.

How do you get the generated stylesheet (and other generated assets)  
to your asset host?

I’m not quite sure I understand how these two functions are to work  
side by side unless you share the app over NFS. Starting n mongrels  
over NFS is quite a task. It works, but it is rather slow and I prefer  
the app servers have their own local copy of the application, but then  
each app server will generate its own assets and the asset hosts will  
have no way to see them. the asset\_packager gem works well, but then I  
lose the multiple asset host feature ☹

Fredrik
