Welcome Guest | Login

Images not showing up...

I know this might be a silly quetion, but I have been racking my brain trying to figure it out.
My stylesheet gets read but my images do not show up on my site... referenced from the stylesheet or my rhtml files.
I looked in my development.log file and this is what I see for the images:

ActionController::RoutingError (no route found to match "/images/page_bottom.jpg" with {:method=>:get}):
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1292:in `recognize_path'
   /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1282:in `recognize'
   /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispatch'
   /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:168:in `process_request'
   /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:143:in `process_each_request!'
   /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:109:in `with_signal_handler'
   /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:142:in `process_each_request!'
   /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in `each_cgi'
   /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each'
   /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each_cgi'
   /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:141:in `process_each_request!'
   /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:55:in `process!'
   /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:25:in `process!'
   dispatch.fcgi:24

any ideas?

(At least I got the site running, right???)

2007-06-01 04:05 PM

Hello,

Could you please double check the permissions of your images and the stylesheets. Thank you

2007-06-01 04:33 PM

HostingRails Support
Also - make sure your RewriteRules are in the correct order -- /images/page_bottom.jpg should never be sent to Rails.   (I've seen this sort of thing happen if you put the dispatch.fcgi rule up over where it should be. )

2007-06-01 04:35 PM

Thanks for the responses.
I am not really sure how to check the permissions of the images... but this is what my .htaccess looks like:


# General Apache options
#AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI

# If you don't want Rails to look in certain directories,
# use the following rewrite rules so that Apache won't rewrite certain requests
#
# Example:
#   RewriteCond %{REQUEST_URI} ^/notrails.*
#   RewriteRule .* - [L]

# Redirect all requests not available on the filesystem to Rails
# By default the cgi dispatcher is used which is very slow
#
# For better performance replace the dispatcher with the fastcgi one
#
# Example:
#   RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
RewriteEngine On

# If your Rails application is accessed via an Alias directive,
# then you MUST also set the RewriteBase in this htaccess file.
#
# Example:
#   Alias /myrailsapp /path/to/myrailsapp/public
#   RewriteBase /myrailsapp

RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

I thought this was correct, let me know if it's not.
Thank you both!

2007-06-01 05:46 PM

Hello,

You can check the permission by logging to your account via ssh and by executing the command:
ls -al
It will do a long listing of the files and folder also shows the permission and ownerships. Thank you

2007-06-01 06:02 PM

HostingRails Support
and the .htaccess looks ok -- you're using fastcgi?  -- does /images/page_bottom.jpg actually exist? Strange....yeah...check the permissions.

2007-06-01 06:14 PM

thought I was using fastcgi... it does exist.

the permissions of the image folder which resides at: ~\app\public\images
reads:

total 128
drwxr-xr-x  2 ugiveme ugiveme  4096 Jun  1 12:41 ./
drwxr-xr-x  6 ugiveme ugiveme  4096 Jun  1 17:43 ../
-rw-------  1 ugiveme ugiveme   467 Oct 14  2005 body_bg.jpg
-rw-------  1 ugiveme ugiveme  3066 Oct 17  2005 footer_logo.jpg
-rw-------  1 ugiveme ugiveme   479 Oct 14  2005 header_bg.jpg
-rw-------  1 ugiveme ugiveme  3748 Oct 18  2005 layout.gif
-rw-r--r--  1 ugiveme ugiveme 68201 May 23 17:37 money_logo.jpg
-rw-------  1 ugiveme ugiveme  4742 Oct 14  2005 nav_bg.jpg
-rw-------  1 ugiveme ugiveme   461 Oct 14  2005 nav_bg_on.jpg
-rw-------  1 ugiveme ugiveme   739 Oct 14  2005 page_bottom.jpg
-rw-------  1 ugiveme ugiveme  1762 Oct 14  2005 page_top.jpg
-rw-------  1 ugiveme ugiveme  4698 Oct 17  2005 pc_logo.jpg
-rw-r--r--  1 ugiveme ugiveme  1787 Jun  1 12:35 rails.png

for stylesheets:

total 16
drwxr-xr-x  2 ugiveme ugiveme 4096 Jun  1 12:41 ./
drwxr-xr-x  6 ugiveme ugiveme 4096 Jun  1 17:43 ../
-rw-r--r--  1 ugiveme ugiveme 4452 Jun  1 15:54 voodoo.css

Strange indeed!

2007-06-01 06:51 PM

So thank you Kumar and William, it was permissions, very strange, not sure why it was set so others could not read...
thanks againfor the spot on help!

2007-06-01 06:59 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.