Reputation: 111
Good afternoon all,
I know that there are a lot of questions/answers on stackoverflow regarding Broken Glyphicons with Rails 4 framework. However, none of those solutions are working for me, in addition my JST templates are not updating my view, and no error is being thrown.
See sample code below: (I believe something is wrong with the Asset Pipeline, any tips on troubleshooting would be appreciated.)
My Environment Configurations
Gemfile - sample
gem 'rails', '4.2.6'
gem 'bootstrap-sass', '~> 3.3.5.1'
gem 'sass-rails', '~> 5.0.1'
gem 'ejs'
application.scss - sample
@import "bootstrap-sprockets";
@import "bootstrap";
update.js.erb
console.log('before jst call');
$('#sample').html(JST["templates/sample_update"](
{
name: "<%= @model.name %>",
phone_number: "<%= @model.phone_no %>"
})
);
console.log('jst call completed!');
Note: The 1st log statement gets printed, the 2nd one doesn't, and no errors are thrown.
sample_update.jst.ejs
<td><%= name %></td>
<td><%= phone_number %></td>
Also, attached is a screenshot of what the Glyphicons look like in Firefox.
UPDATE
I've fixed the JST issue, it was a very silly mistake. In the application.js, I forgot to include my templates directory.
//= require_tree ./templates
Upvotes: 0
Views: 32
Reputation: 111
Sorry for the late reply, for those who may have viewed this. The issue was that there was a typo in the html class attribute for the glyphicon element, and therefore nothing was wrong with the Asset Pipeline, it's fine.
'glyphicon' was spelled 'glyhpicon'.
Upvotes: 0