簡體   English   中英

找不到導入文件或文件不可讀:生產模式中的指南針

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

如果我在開發模式下運行,則應用程序運行。 如果使用Rails服務器-e生產,則顯示錯誤: 編譯資產w.css時出錯:Sass :: SyntaxError:找不到導入文件或文件不可讀:指南針/重置。

更多日志

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

如何解決這個問題?

您需要預編譯資產:

bundle exec rake assets:precompile

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM