# Css and js in plugins

**URL:** <https://www.ruby-forum.com/t/css-and-js-in-plugins/114931>\
**Category:** Rails\
**Created:** [September 18, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/css-and-js-in-plugins/114931 "2007-09-18T22:43:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![giorgio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/cab0a1/32.png) [@giorgio](https://www.ruby-forum.com/u/giorgio)\
**Post date:** [September 18, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/css-and-js-in-plugins/114931/1 "2007-09-18T22:43:54Z")

</div>

Hi,

I want to package some stuff as a plugin for convenience and it works  
fine.

The only trouble is that there is some javascript and a css that are  
required and I have been copying them manually to the public folder.

Is there a better way to deal with css and js files in plugins?

Cheers  
George

---

<div class="post-metadata">

**Author:** ![giorgio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/cab0a1/32.png) [@giorgio](https://www.ruby-forum.com/u/giorgio)\
**Post date:** [September 19, 2007, 1:56am UTC](https://www.ruby-forum.com/t/css-and-js-in-plugins/114931/2 "2007-09-19T01:56:18Z")

</div>

Engines work really well for this. If it’s for personal use, then all  
you’d  
need to do is add the engines plugin. Otherwise, you could have a File  
copy  
script in your init.rb that copies it over every time the plugin is  
launched, in other words, when the server starts up.

On 9/18/07, giorgio [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is there a better way to deal with css and js files in plugins?
> 
> Cheers  
> George
> 
> >

–  
Nathaniel Steven Henry Brown  
604-724-6624
