CSS issue


#1

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


#2

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’) %>