3

I am using Rails 4.2.0 and all of a sudden my style tag in my application.html.erb layout doesn't render the application.css anymore.

In my layout I have:

<%= stylesheet_link_tag 'application', media: 'all' %>

Which produces this error:

Showing /****/app/views/layouts/application.html.erb where line #5 raised:

TypeError: undefined is not an object (evaluating 'processor.process')
  (in /****/app/assets/stylesheets/application.scss)

Which line 5 is simply the stylesheet_link_tag above.

If it helps my Gem file looks like this:

gem 'rails', '~> 4.2.0'
gem 'mysql2'
gem 'sass-rails'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0',          group: :doc
gem 'bootstrap-sass'
gem 'bootstrap_form'
gem 'autoprefixer-rails'
gem 'bcrypt-ruby', :require => 'bcrypt' 
gem 'lodash-rails'
gem 'angular-rails-templates'
gem 'mini_magick'
gem 'refile', require: ['refile/rails', 'refile/image_processing']
gem 'aws-sdk'
gem 'RedCloth'
gem 'sass-json-vars'

Removing the stylesheet_link_tag makes the application run fine. Keeping the tag but emptying the application.scss file does not.

Any ideas?

Ian Briggs
  • 35
  • 6

1 Answers1

2

To fix the process error, add therubyracer to your Gemfile. Credit to this S.O. question.

gem 'therubyracer', platforms: :ruby

and to fix the Bootstrap glyphicons issue, import bootstrap-sprockets prior to importing Bootstrap or custom variables in your application.scss

@import 'bootstrap-sprockets';

For reference to missing icons, here is a nice snippet from the Bootstrap-sass README.

Community
  • 1
  • 1
Justin
  • 4,822
  • 2
  • 25
  • 63