Topic: Image reloading problem

Hi I am new to Ruby on Rails. I included an image_tag on my home page and then I visit the page on Firefox. The image is showing but if I press 'Reload current page' the image goes away and the alternate text shows.

The images are not loading, every other time. But, they are stored in public/images in the rails directory. If you've encountered this problem before please fill me in. Thanks in advance.-Russell

Re: Image reloading problem

Are you on Rails 3.X?

Now the preferred place to put all your image assets in app/assets/images

Not sure if that is your problem or not,  but might as well get current.

public/image should still work though???

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: Image reloading problem

I'm on Rails 2.3. I wonder is there anything can be done to improve Rails' ability to serve the image itself?

Re: Image reloading problem

Could be related to how your caching is set up,  what does your environment.rb
or
environments/production.rb
and
environments/development.rb

have in them regarding caching?

is this happening in development, production, or both?

post the actual image_tag usage  just in case.

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: Image reloading problem

I've got this in development.rb (it's using development.)

# In the development environment your application's code is reloaded on
# every request.  This slows down response time but is perfect for development
# since you don't have to restart the webserver when you make code changes.
config.cache_classes = false

Changing it to true does not seem to work.

Here's the image_tag:

<%= image_tag "/images/pic.png" %>

Still looking into things that could be causing the images to disappear when the page is refreshed.

Re: Image reloading problem

does it behave the same with another browser?

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: Image reloading problem

Webrick was installed and that was the culprit. Installed Mongrel and now Rails defaults to it. If you want to use Webrick however I suppose there is a patch etc. Anyways I appreciate it.