Sass :: SyntaxError when using the Bootstrap in Rails application on Heroku

I installed twitter bootstrap by copying the files to the directory of my resources according to the instructions here: http://www.erikminkel.com/2013/09/01/twitter-bootstrap-3-in-a-rails-4-application/

After following the instructions accurately presented and executing "rake assets: precompile RAILS_ENV = development", I can use bootstrap 3 on my development rails server.

However, when I try to execute "heroku run rake assets: precompile RAILS_ENV = production", I get this error:

Sass::SyntaxError: Invalid CSS after "...ss","sources":[": expected "|", 
was ""less/theme.les..." (in /app/app/assets/stylesheets/application.css) (sass):444

I'm not sure what that means. When I open "application.css" in the "assets / stylesheets" folder, I can’t even find line 444. I have some forest files left after running the "rails g scaffold ..." commands - this may be the cause of this problem ? And, obviously, the deployed heroku application looks like a non-boot application when I look at it from the heroku page and give a "resource not found" error.

In public / assets / application-mydigest.ccs, I found the following line of code that causes an error:

{"version":3,"file":"bootstrap-theme.css","sources":["less/theme.less","less/mixins/vendor-prefixes.less","bootstrap-theme.css","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":"AAeA;;;;;;EAME,0CAAA;EC+CA,6FAAA;EACQ,qFAAA;EC5DT;AFiBC;;;;;;;;;;;;EC0CA,0DAAA;EACQ,kDAAA;EC7CT;AFqCC;;EAEE,wBAAA;EEnCH;AFwCD;EG/CI,0EAAA;EACA,qEAAA

However, it seems strange that this will happen only in production. Also, the CSS syntax looks fine.

+4
source share
3

, - css , application.css.

- , .

Rails Bootstrap , , bootstrap-sass gem

+2

- Bootstrap 3? Heroku ... Bootstrap css , Bootstrap 3 . gem 'rails-assets-bootstrap' https://rails-assets.org ' gem. , .

0

E , , .

- (js/css) (application.js/application.css) -  - assets.precompile =% w (custom.css custom.js),

, u precompile... rails (/), js/css, , (apache), # Don't fallback to assets pipeline if a precompiled asset is missed config.assets.compile = false production.rb /, Rails , webserver.Hence , , : , public/assets/javascripts/application.css/js , , app/assets/stylesheets/application.css app/assets/javascripts/application.js : ... , , .

FOR MORE DETAILS..REFER this

0
source

All Articles