Hello friends I am calling css file from following folder "<%= stylesheet_path("#{RAILS_ROOT}/public/themes/style.css") %>" And getting the following error any idea? ActionController::RoutingError (No route matches "/home/user/test/testapp/public/themes/style.css" with {:method=>:get}): Regards Abhi --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hello friends I am calling css file from following folder "<%= stylesheet_path("#{RAILS_ROOT}/public/themes/style.css") %>" And getting the following error any idea? ActionController::RoutingError (No route matches "/home/user/test/testapp/public/themes/style.css" with {:method=>:get}): Regards Abhi --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Abhishek shukla wrote:> I am calling css file from following folder > "<%= stylesheet_path("#{RAILS_ROOT}/public/themes/style.css") %>"I think that should be stylesheet_tag. Then take the RAILS_ROOT and public out. You are generating HTML for a web browser, and it can only hit your web browser (roughly speaking) from below the public folder. <%= stylesheet_tag(''themes/style.css'') %> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Abhishek shukla wrote:> Hello friends > I am calling css file from following folder > "<%= stylesheet_path("#{RAILS_ROOT}/public/themes/style.css") %>" > And getting the following error any idea? > ActionController::RoutingError (No route matches > "/home/user/test/testapp/public/themes/style.css" with {:method=>:get}): > > Regards > AbhiIs this code in between your head tags? Can''t you use: <%= stylesheet_link_tag "style" %> -- 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 -~----------~----~----~----~------~----~------~--~---
How can i call a stylesheet other then from /public/stylesheets/ folder.. On 4/14/09, Shandy Nantz <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Abhishek shukla wrote: >> Hello friends >> I am calling css file from following folder >> "<%= stylesheet_path("#{RAILS_ROOT}/public/themes/style.css") %>" >> And getting the following error any idea? >> ActionController::RoutingError (No route matches >> "/home/user/test/testapp/public/themes/style.css" with {:method=>:get}): >> >> Regards >> Abhi > > Is this code in between your head tags? Can''t you use: > <%= stylesheet_link_tag "style" %> > -- > 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 -~----------~----~----~----~------~----~------~--~---
Abhishek shukla wrote:> How can i call a stylesheet other then from /public/stylesheets/ > folder..<%= stylesheet_link_tag "/themes/style" %> must be work -- 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 -~----------~----~----~----~------~----~------~--~---