I dunno how lighty works exactly but as far as webrick, apache, mongrel,
etc... "/img/whatever.jpg" needs to be in the "img"
subdirectory of the
"public" directory. Is that not the case here?
RSL
On 2/15/07, Matt Davies
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:>
>
> Hello
>
> One of ours sites has just lost all it''s images and styling.
>
> It''s not a very busy site at all, so it might have been not
working
> properly for some time now.
>
> Here''s how we start it in Lighty
> <pre>
> $HTTP["host"] == "gregynog.glam.ac.uk" {
> server.document-root = "/www/rails/greg/current/public/"
> server.error-handler-404 = "/dispatch.fcgi"
> accesslog.filename = "/www/rails/greg/current/log/access.log"
> server.errorlog = "/www/rails/greg/current/log/error.log"
> fastcgi.server = (".fcgi" =>
> ("greg" =>
> ( "socket" =>
"/www/rails/greg/shared/tmp/greg-0.socket" ),
> ( "socket" =>
"/www/rails/greg/shared/tmp/greg-1.socket" )))
> }
> </pre>
>
> Here''s an example of one of the erros from the production log
>
>
> <pre>
> ActionController::RoutingError (Recognition failed for
> "/img/gregynog.jpg"):
> /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1
> /lib/action_controller/routing.rb:488:in
> `recognition_failed''
> /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1
> /lib/action_controller/routing.rb:478:in
> `recognize!''
> /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in
> `dispatch''
> /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:150:in
> `process_request''
> /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:54:in
> `process!''
> /usr/lib/site_ruby/1.8/fcgi.rb:600:in `each_cgi''
> /usr/lib/site_ruby/1.8/fcgi.rb:117:in `session''
> /usr/lib/site_ruby/1.8/fcgi.rb:104:in `each_request''
> /usr/lib/site_ruby/1.8/fcgi.rb:36:in `each''
> /usr/lib/site_ruby/1.8/fcgi.rb:597:in `each_cgi''
> /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:53:in
> `process!''
> /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:23:in
> `process!''
> /www/rails/greg/current/public/dispatch.fcgi:24
> </pre>
>
> And finally here''s the routes.rb form the application
> <pre>
> ActionController::Routing::Routes.draw do |map|
> map.accessibility
>
''/accessibility'',:controller=>''pages'',:action=>''accessibility''
> map.locationmap
>
''/location'',:controller=>''pages'',:action=>''locationmap''
> map.signup
''/signup'',:controller=>''people'',:action=>''new''
> map.welsh
>
>
''/cymraeg'',:controller=>''pages'',:action=>''view'',:language=>''cy'',:title=>''welshindex''
> map.page
>
''/page/:title'',:controller=>''pages'',:action=>''view'',:language=>''en''
> map.tudalen
>
''/tudalen/:title'',:controller=>''pages'',:action=>''view'',:language=>''cy''
> map.connect
>
'''',:controller=>''pages'',:action=>''view'',:language=>''en'',:title=>''index''
> map.connect '':controller/:action/:id''
> end
> </pre>
>
> We''re not serving the img folder with a controller, but were using
the
> lighttpd to serve the static content, I think.
>
> Anyone got any ideas what''s happening?
>
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---