简体   繁体   中英

File to import not found or unreadable: compass in production mode

If i run in dev mode application running. If with rails server -e production, display error: Error compiling asset w.css: Sass::SyntaxError: File to import not found or unreadable: compass/reset.

More logs

Started GET "/assets/w.css" for 127.0.0.1 at 2016-04-12 10:51:51 +0300
Error compiling asset w.css:
Sass::SyntaxError: File to import not found or unreadable: compass/reset.
  (in /home/user/projects/projectname/app/assets/stylesheets/welcome.sass)
Served asset /w.css - 500 Internal Server Error
Started GET "/assets/w.js" for 127.0.0.1 at 2016-04-12 10:51:51 +0300
Error compiling asset w.js:
Sprockets::FileNotFound: couldn't find file 'bootstrap-transition'
  (in /home/user/projects/projectname/app/assets/javascripts/w.js.coffee:3)
Served asset /w.js - 500 Internal Server Error
Started GET "/assets/w.css" for 127.0.0.1 at 2016-04-12 10:52:16 +0300
Error compiling asset w.css:
Sass::SyntaxError: File to import not found or unreadable: compass/reset.
  (in /home/user/projects/projectname/app/assets/stylesheets/welcome.sass)

gemfile

group :assets do
  gem 'sass-rails'
  gem 'coffee-rails'
  gem 'compass-rails'
  gem 'bootstrap-sass', '2.1.1.0'
  gem 'therubyracer'
  gem 'execjs'
  gem 'uglifier', '>= 1.0.3'
  gem 'oily_png'
  # gem 'font-awesome-rails'
  gem 'turbo-sprockets-rails3'
end

How solve this issue?

您需要预编译资产:

bundle exec rake assets:precompile

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM