I am learning ruby on rails, but I have this problem with my CSS code.
so in ~/Ruby Code/My_Project/app/views/layouts/application.html.erb I have this:
<!DOCTYPE html>
<html>
<head>
<title>MyProject</title>
<%= stylesheet_link_tag :all %>
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
</body>
</html>
and in ~/Ruby Code/My_Project/public/stylesheets I have this, a CSS file called "My_Project.css".
also in ~/Ruby Code/My_Project/app/views/users, I have the index.html.erb file:
<div id="user_list" >
<h1>Listing users</h1>
<table>
<% @users.each do |user| %>
<tr class="<%= cycle('list_line_odd', 'list_line_even') %>" >
<td class="user_description" >
<dl>
<dt><%= user.name %></dt>
<dt><%= user.surname %></dt>
<dt><%= user.age %></dt>
<dt><%= user.date_birth %></dt>
<dt><%= user.date_of_reg %></dt>
<dt><%= user.email %></dt>
</td>
<td class="list_actions" >
<%= link_to 'Show', user %><br/>
<%= link_to 'Edit', edit_user_path(user) %><br/>
<%= link_to 'Destroy', user,
:confirm => 'Are you sure?',
:method => :delete %>
</td>
</tr>
<% end %>
</table>
</div>
<br />
<%= link_to 'New user', new_user_path %>
why is Ruby not loading the CSS file ? Is it placed in the wrong directory?
public/stylesheetsbut use the asset pipeline and are stored underassets/stylesheets.