On Thursday 16 September 2010, elliottg wrote:
> I am working on a Rails CMS gem. I want the Gem to have its own
> Public dir (like Rails) to hold css/js/images etc... I have been
> trying a lot of different pathing options from my Gem-centric views,
> but no matter what I try I can't target any of the files.

I don't think you can do what you're trying to do in Rails alone, 
however, I'd appreciate to be shown wrong. The reason is that public is 
not handled by your application at all. Rather, requests to files in 
public are handled by the web server -- and that's a good thing, because 
apache or nginx are much faster at serving static files than Rails 
proper would be.

I take it, the usual way to add assets from a gem is to include a 
generator that copies (or links) these assets to the application's 
public directory.

Michael

-- 
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to