I'm trying to generate a bootstrap-themed scaffold via the following actions:
Add
gem 'twitter-bootstrap-rails'
line to the end of theGemfile
and runbundle install
Run
rails generate bootstrap:install static
as stated in the documentationPlace the DB account details (username and password) to the "default" section of
database.yml
file and runrake db:create
Run
rails g scaffold Purchase company_name:text product_name:text contact_person:text email:text comment:text
Run rake
db:migrate
Run
rails g bootstrap:themed Purchases
Every command returns 0, so I restarted a web-server and go to the 127.0.0.1:3000/purchases
, but it looks like it doesn't use twitter bootstrap at all:
purchases/index.html.erb
<h1>Listing purchases</h1>
<table>
<thead>
<tr>
<th>Company name</th>
<th>Product name</th>
<th>Contact person</th>
<th>Email</th>
<th>Comment</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @purchases.each do |purchase| %>
<tr>
<td><%= purchase.company_name %></td>
<td><%= purchase.product_name %></td>
<td><%= purchase.contact_person %></td>
<td><%= purchase.email %></td>
<td><%= purchase.comment %></td>
<td><%= link_to 'Show', purchase %></td>
<td><%= link_to 'Edit', edit_purchase_path(purchase) %></td>
<td><%= link_to 'Destroy', purchase, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Purchase', new_purchase_path %>
Why? What am I doing wrong? How can I fix it?
I'm using Ruby on Rails 4.1.4 btw.