Public/images


#1

Is there a reason that public/images isn’t overlaid into
engine_files/myengine/images the same way javascripts and stylesheets
are? Is there a way to turn it on?

-todd[1]


#2

Hello,

I also created some images in a new public/images directory this
evening, and I was wondering if it would copy the images directory,
and… it did! I did not have to turn anything on. Of course you have
to restart webrick. If you’re using Apache, I already noticed that it
does not even copy/update the javascripts and stylesheets directory.

Bart


#3

On 3/27/06, Bart M. removed_email_address@domain.invalid wrote:

Hello,

I also created some images in a new public/images directory this
evening, and I was wondering if it would copy the images directory,
and… it did! I did not have to turn anything on. Of course you have
to restart webrick. If you’re using Apache, I already noticed that it
does not even copy/update the javascripts and stylesheets directory.

Bart

Thanks Bart

I just needed a restart. I wonder why the directory wasn’t there to
begin with?

-todd[1]


#4

When you start Rails (via a webserver or via the console), it will
copy everything underneath public/ in your engines into
subdirectories of the main RAILS_ROOT/public folder. If you make
changes to these files, you’ll have to restart your server (or console
process) to have them re-copied.

When running a webserver, you’ll need to make sure that the user which
your webserver runs as has permission to write files under /public.

  • james

On 3/27/06, Todd W. removed_email_address@domain.invalid wrote:

Thanks Bart

I just needed a restart. I wonder why the directory wasn’t there to begin with?

-todd[1]


engine-users mailing list
removed_email_address@domain.invalid
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

  • J *
    ~

#5

Depending on what version of engines you are on, there are also some
helper
methods as well…

Engine_image
Engine_image_src

-Nb

On 3/27/06 3:09 PM, “James A.” removed_email_address@domain.invalid wrote:

Bart
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

  • J *
    ~

engine-users mailing list
removed_email_address@domain.invalid
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

Nathaniel S. H. Brown                        http://nshb.net

#6

At the moment, calling

Engines.copy_engine_files(Engines[:your_engine_name])

will do it. I’ll make it more convenient in the next release.

  • james

On 3/29/06, Subimage removed_email_address@domain.invalid wrote:

http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

  • J *
    ~

#7

Quick, someone write a rake task that copies all public images/js/css
files over so I don’t have to…

Include it with the next version of engines too :smiley: