Hi - I think this is a simple 2.0 conversion issue. In my application layout, I have a simple stylesheet link tag: <%= stylesheet_link_tag ''application'' %> In my public/stylesheets directory, I have application.css When my pages are rendered, I get: <h1>Routing Error</h1> 27<p><pre>No route matches "/stylesheets/application.css" with {:method=>:get}</pre></p> What am I doing wrong? Thanks, Dinohanks, Dino --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 18, 2008, at 10:10 AM, dino d. wrote:> Hi - I think this is a simple 2.0 conversion issue. In my application > layout, I have a simple stylesheet link tag: > > <%= stylesheet_link_tag ''application'' %> > > In my public/stylesheets directory, I have application.css > > > When my pages are rendered, I get: > > <h1>Routing Error</h1> > 27<p><pre>No route matches "/stylesheets/application.css" > with {:method=>:get}</pre></p> > > What am I doing wrong? > > Thanks, > Dinohanks, > DinoDo you really have a ''stylesheets'' directory under your web server''s document root? Normally for Rails apps this is #{RAILS_ROOT}/public/ stylesheets, but if your web server isn''t looking at RAILS_ROOT/public then it''s going to give the Rails routing a shot. -Rob Rob Biedenharn http://agileconsultingllc.com Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> Do you really have a ''stylesheets'' directory under your web server''s > document root? Normally for Rails apps this is #{RAILS_ROOT}/public/Thanks for the reply. Yes, I have a public/stylesheets directory off my app root, not my ruby root. i.e. ruby/myapp/public/stylesheets/ application.css Any other ideas? Thanks again, Dino --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Is this just a development box? On some Rails hosts, css files are proxied to a shared directory outside of Rails in the Apache config. H --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Mar 18, 2008, at 11:48 AM, dino d. wrote:>> Do you really have a ''stylesheets'' directory under your web server''s >> document root? Normally for Rails apps this is #{RAILS_ROOT}/public/ > > Thanks for the reply. Yes, I have a public/stylesheets directory off > my app root, not my ruby root. i.e. ruby/myapp/public/stylesheets/ > application.css > > Any other ideas? > > Thanks again, > DinoAre you certain that your web listener (Apache? Mongrel? other?) is looking at public/ as the document root? If you put an index.html file there, is it shown for GET / to the server? I saw in your original message that you had a public/stylesheets directory, but what I''m asking is whether the rest of the system (external to Rails) has a consistent view of the app structure. -Rob Rob Biedenharn http://agileconsultingllc.com Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> I saw in your original message that you had a public/stylesheets > directory, but what I''m asking is whether the rest of the system > (external to Rails) has a consistent view of the app structure. > > -RobI''m just in dev mode using webrick locally. The public dir has the ruby standard index.html and it does indeed show up if i go to localhost:3000/ Dino --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---