这是一个全新的Rails应用程序,没有任何代码。我正在尝试在生产环境中测试webpacker。以下是packs / application.js中唯一的代码
import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.createElement(<div/>, document.getElementById('c'))
我的Gemfile也很简单:
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', '~> 5.1.5'
gem 'sqlite3'
gem 'puma', '~> 3.7'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'webpacker'
gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'capybara', '~> 2.13'
gem 'selenium-webdriver'
end
group :development do
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem "capistrano", "~> 3.10", require: false
gem "capistrano-rails", "~> 1.3", require: false
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
部署时失败,并显示以下内容。我不知道为什么要尝试编译测试文件“ node-sass / test / fixtures”。
I, [2018-09-13T13:41:35.041862 #20614] INFO -- : Writing /var/sg/releases/20180913080816/public/assets/node-sass/test/fixtures/cwd-include-path/expected-f84c472c50bde074489897e0eb2c3d732ebc7a54e9a103878ab966a3cfb5ce94.css.gz
I, [2018-09-13T13:41:35.048182 #20614] INFO -- : Writing /var/sg/releases/20180913080816/public/assets/node-sass/test/fixtures/cwd-include-path/outside-f84c472c50bde074489897e0eb2c3d732ebc7a54e9a103878ab966a3cfb5ce94.css
I, [2018-09-13T13:41:35.048322 #20614] INFO -- : Writing /var/sg/releases/20180913080816/public/assets/node-sass/test/fixtures/cwd-include-path/outside-f84c472c50bde074489897e0eb2c3d732ebc7a54e9a103878ab966a3cfb5ce94.css.gz
rake aborted!
Sass::SyntaxError: File to import not found or unreadable: outside.
Load paths:
/var/sg/releases/20180913080816/app/assets/config
/var/sg/releases/20180913080816/app/assets/images
/var/sg/releases/20180913080816/app/assets/javascripts
/var/sg/releases/20180913080816/app/assets/stylesheets
/var/sg/shared/bundle/ruby/2.5.0/gems/coffee-rails-4.2.2/lib/assets/javascripts
/var/sg/shared/bundle/ruby/2.5.0/gems/actioncable-5.1.6/lib/assets/compiled
/var/sg/shared/bundle/ruby/2.5.0/gems/actionview-5.1.6/lib/assets/compiled
/var/sg/shared/bundle/ruby/2.5.0/gems/turbolinks-source-5.2.0/lib/assets/javascripts
/var/sg/releases/20180913080816/node_modules
/var/sg/releases/20180913080816/node_modules/node-sass/test/fixtures/cwd-include-path/root/index.scss:1
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/import_node.rb:67:in `rescue in import'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/import_node.rb:44:in `import'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/import_node.rb:28:in `imported_file'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/import_node.rb:37:in `css_import?'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/visitors/perform.rb:310:in `visit_import'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/visitors/base.rb:36:in `visit'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/visitors/perform.rb:158:in `block in visit'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/stack.rb:79:in `block in with_base'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/stack.rb:135:in `with_frame'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/stack.rb:79:in `with_base'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/visitors/perform.rb:158:in `visit'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/visitors/base.rb:52:in `block in visit_children'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/visitors/base.rb:52:in `map'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/visitors/base.rb:52:in `visit_children'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/visitors/perform.rb:167:in `block in visit_children'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/visitors/perform.rb:179:in `with_environment'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/visitors/perform.rb:166:in `visit_children'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/visitors/base.rb:36:in `block in visit'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/visitors/perform.rb:186:in `visit_root'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/visitors/base.rb:36:in `visit'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/visitors/perform.rb:157:in `visit'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/visitors/perform.rb:10:in `visit'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/root_node.rb:36:in `css_tree'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/tree/root_node.rb:20:in `render'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-3.5.7/lib/sass/engine.rb:290:in `render'
/var/sg/shared/bundle/ruby/2.5.0/gems/sass-rails-5.0.7/lib/sass/rails/template.rb:47:in `evaluate'
/var/sg/shared/bundle/ruby/2.5.0/gems/tilt-2.0.8/lib/tilt/template.rb:109:in `render'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy_tilt_processor.rb:25:in `call'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:23:in `block in call'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/utils.rb:200:in `dfs'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:24:in `call'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in `block in find'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:231:in `block in stat_tree'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:231:in `block in stat_tree'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:231:in `block in stat_tree'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:231:in `block in stat_tree'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:231:in `block in stat_tree'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `each'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `block in logical_paths'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `each'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `logical_paths'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in `find'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger'
/var/sg/shared/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
/var/sg/shared/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/home/subbu/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.4/lib/bundler/cli/exec.rb:74:in `load'
/home/subbu/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.4/lib/bundler/cli/exec.rb:74:in `kernel_load'
/home/subbu/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.4/lib/bundler/cli/exec.rb:28:in `run'
/home/subbu/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.4/lib/bundler/cli.rb:424:in `exec'
/home/subbu/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/subbu/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/home/subbu/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.4/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/home/subbu/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.4/lib/bundler/cli.rb:27:in `dispatch'
/home/subbu/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.4/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/home/subbu/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.4/lib/bundler/cli.rb:18:in `start'
/home/subbu/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.4/exe/bundle:30:in `block in <top (required)>'
/home/subbu/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.4/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/home/subbu/.rvm/gems/ruby-2.5.1/gems/bundler-1.16.4/exe/bundle:22:in `<top (required)>'
/home/subbu/.rvm/gems/ruby-2.5.1/bin/bundle:23:in `load'
/home/subbu/.rvm/gems/ruby-2.5.1/bin/bundle:23:in `<main>'
/home/subbu/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in `eval'
/home/subbu/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in `<main>'