Forum: Ruby on Rails CSS issue...

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
589525f133e603e1f17af9b03176c000?d=identicon&s=25 Abhishek shukla (Guest)
on 2009-04-14 15:50
(Received via mailing list)
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
Aafa8848c4b764f080b1b31a51eab73d?d=identicon&s=25 Phlip (Guest)
on 2009-04-14 16:02
(Received via mailing list)
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') %>
This topic is locked and can not be replied to.