Homeland app.local.env 中 app name 不能用中文名,用中文名报错。

fykec · 2017年10月18日 · 最后由 fykec 回复于 2017年10月18日 · 1661 次阅读

配置如图

[1] * Preloading application
[1] ! Unable to load application: Encoding::CompatibilityError: incompatible character encodings: UTF-8 and ASCII-8BIT
bundler: failed to load command: puma (/var/www/homeland/vendor/bundle/ruby/2.4.0/bin/puma)
Encoding::CompatibilityError: incompatible character encodings: UTF-8 and ASCII-8BIT
  (erb):43:in `concat'
  (erb):43:in `<main>'
  /usr/local/lib/ruby/2.4.0/erb.rb:896:in `eval'
  /usr/local/lib/ruby/2.4.0/erb.rb:896:in `result'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rails-settings-cached-0.6.6/lib/rails-settings/default.rb:41:in `initialize'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rails-settings-cached-0.6.6/lib/rails-settings/default.rb:34:in `new'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rails-settings-cached-0.6.6/lib/rails-settings/default.rb:34:in `instance'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rails-settings-cached-0.6.6/lib/rails-settings/default.rb:22:in `[]'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rails-settings-cached-0.6.6/lib/rails-settings/settings.rb:66:in `[]'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rails-settings-cached-0.6.6/lib/rails-settings/base.rb:35:in `[]'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rails-settings-cached-0.6.6/lib/rails-settings/settings.rb:33:in `rescue in method_missing'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rails-settings-cached-0.6.6/lib/rails-settings/settings.rb:23:in `method_missing'
  /var/www/homeland/config/environments/production.rb:35:in `block in <top (required)>'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/railtie.rb:211:in `instance_eval'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/railtie.rb:211:in `configure'
  /var/www/homeland/config/environments/production.rb:1:in `<top (required)>'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/engine.rb:600:in `block (2 levels) in <class:Engine>'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/engine.rb:599:in `each'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/engine.rb:599:in `block in <class:Engine>'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `instance_exec'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `run'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/initializable.rb:59:in `block in run_initializers'
  /usr/local/lib/ruby/2.4.0/tsort.rb:228:in `block in tsort_each'
  /usr/local/lib/ruby/2.4.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
  /usr/local/lib/ruby/2.4.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
  /usr/local/lib/ruby/2.4.0/tsort.rb:431:in `each_strongly_connected_component_from'
  /usr/local/lib/ruby/2.4.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/initializable.rb:48:in `each'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/initializable.rb:48:in `tsort_each_child'
  /usr/local/lib/ruby/2.4.0/tsort.rb:415:in `call'
  /usr/local/lib/ruby/2.4.0/tsort.rb:415:in `each_strongly_connected_component_from'
  /usr/local/lib/ruby/2.4.0/tsort.rb:349:in `block in each_strongly_connected_component'
  /usr/local/lib/ruby/2.4.0/tsort.rb:347:in `each'
  /usr/local/lib/ruby/2.4.0/tsort.rb:347:in `call'
  /usr/local/lib/ruby/2.4.0/tsort.rb:347:in `each_strongly_connected_component'
  /usr/local/lib/ruby/2.4.0/tsort.rb:226:in `tsort_each'
  /usr/local/lib/ruby/2.4.0/tsort.rb:205:in `tsort_each'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/initializable.rb:58:in `run_initializers'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/application.rb:353:in `initialize!'
  /var/www/homeland/config/environment.rb:5:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:55:in `instance_eval'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:55:in `initialize'
  config.ru:in `new'
  config.ru:in `<main>'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:49:in `eval'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:49:in `new_from_string'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:40:in `parse_file'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/puma-3.10.0/lib/puma/configuration.rb:314:in `load_rackup'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/puma-3.10.0/lib/puma/configuration.rb:243:in `app'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/puma-3.10.0/lib/puma/runner.rb:138:in `load_and_bind'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/puma-3.10.0/lib/puma/cluster.rb:397:in `run'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/puma-3.10.0/lib/puma/launcher.rb:183:in `run'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/puma-3.10.0/lib/puma/cli.rb:77:in `run'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/gems/puma-3.10.0/bin/puma:10:in `<top (required)>'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/bin/puma:22:in `load'
  /var/www/homeland/vendor/bundle/ruby/2.4.0/bin/puma:22:in `<top (required)>'

你更新一下 homeland-docker,新版本已经修复了这个问题。

ok 解决了

huacnlee 关闭了讨论。 10月18日 17:38
需要 登录 后方可回复, 如果你还没有账号请 注册新账号