出于某种原因,每当我使用sass glob模式时(例如 @import "recommends/**/*";
(,然后去编译我的资产以进行生产(它在开发中工作(它不起作用(抛出File to import not found or unreadable
错误'(。
关于我没有交代的事情有什么想法吗?
宝石文件:
source "https://rubygems.org"
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
gem "rails"
gem "puma"
gem "dotenv-rails"
gem "newrelic_rpm"
gem "simple_form"
gem "timeliness"
gem "validates_timeliness"
gem "responders"
gem "better_errors"
gem "parsley-rails"
gem "jquery-rails"
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
source "[...]" do
gem "apophenia-rails-logger"
gem "dr_theme", "~> 5"
gem "lead"
gem "ramsey_validators"
end
group :development, :test, :build do
gem "sass-rails", "~> 5.0"
gem "autoprefixer-rails"
gem "sprockets-es6"
end
group :development, :test do
# Call "byebug" anywhere in the code to stop execution and get a debugger console
gem "byebug", platform: :mri
gem "rspec-rails"
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem "web-console", ">= 3.3.0"
gem "listen", "~> 3.0.5"
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem "spring"
gem "spring-watcher-listen", "~> 2.0.0"
gem "spring-commands-rspec"
gem "fuubar"
gem "vcr"
gem "webmock", require: false
gem "capybara"
gem "poltergeist"
gem "i18n-debug", require: false # turn this on to log out I18n localization lookups
end
group :production do
gem "uglifier"
end
定义
gem "sass-rails"
在开发块之外,然后运行
bundle install
并尝试通过以下方式在生产环境中本地运行服务器
rails s -e production
希望这能解决您的问题。快乐编码:)