Ruby on Rails: How can I add a css file with rails project? -


the application.html.erb file:

<!doctype html> <html> <head>   <title>site</title>   <%= stylesheet_link_tag    :all %>   <%= javascript_include_tag "application" %>   <%= csrf_meta_tags %> </head> <body>  <%= yield %>  </body> </html> 

i have file "cake.generic.css" in public/ folder.

but when reload page effect of css file not working.

if see page view source see this:

<!doctype html> <html> <head>   <title>site</title>   <link href="/assets/all.css" media="screen" rel="stylesheet" type="text/css" />   <script src="/assets/jquery.js?body=1" type="text/javascript"></script> <script src="/assets/jquery_ujs.js?body=1" type="text/javascript"></script> <script src="/assets/home.js?body=1" type="text/javascript"></script> <script src="/assets/application.js?body=1" type="text/javascript"></script>    <meta content="authenticity_token" name="csrf-param" /> <meta content="6cpvchxr1amagxd7vmozb82wgx/wmjfdoxjmlfjlzqq=" name="csrf-token" /> </head> <body>  <h1>home#index</h1> <p>find me in app/views/home/index.html.erb</p>   </body> </html> 

what should fix problem?

how can set public folder stylesheets , javascripts?

it looks app/assets folder set css , js files?

rails consolidating css files 1 calling assets/all.css

consider using free plug-ins firebug + firepath further characterize problem. common combo of tools interrogate web page elements , see css contributing display.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -