[英]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. 如果使用Rails服务器-e生产,则显示错误: 编译资产w.css时出错:Sass :: SyntaxError:找不到导入文件或文件不可读:指南针/重置。
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 的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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.