Homeland 在阿里云上安装 Homeland 出错

xujianmin · 2017年03月11日 · 最后由 huacnlee 回复于 2017年03月13日 · 2581 次阅读

按照 Homeland 的 docker 的安装步骤。

docker 和 docker composer 通过自动脚本出错了。所以是用官网的方式来装的。info 一下是正常的。

git clone 了安装的 repository。

sudo make install 一开始正常,bundle 了 gem。

---以上省略都是下载和安装,没有报错。---

Uing exception-track 0.2.0
Using notifications 0.4.0
Using rails-settings-cached 0.6.5
Using rails_autolink 1.1.6
Using status-page 0.1.4
Using devise-encryptable 0.2.0
Bundle complete! 77 Gemfile dependencies, 178 gems now installed.

---至此感觉 gem 是都 bundle 好了---

然后开始报了些 rails 5.0.1 的 depreciation。感觉应该没有大的问题。然后就报错了。

/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:51: warning: constant ::Fixnum is deprecated
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:52: warning: constant ::Bignum is deprecated
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/core_ext/numeric/conversions.rb:138: warning: constant ::Fixnum is deprecated
Database 'homeland' already exists

---虽有报错,至此应该是数据库也建好了。这是我第二次 sudo make install,存了输出到 log.txt。---

/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:51: warning: constant ::Fixnum is deprecated
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:52: warning: constant ::Bignum is deprecated
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/core_ext/numeric/conversions.rb:138: warning: constant ::Fixnum is deprecated
rails aborted!

---至此,rails abort 了,不解。---

Psych::SyntaxError: (<unknown>): did not find expected key while parsing a block mapping at line 47 column 3

---是不是 app.local.env 中有些部分空了?另外,我的 App Name 用了“Jimmy's LegoLand”。这个引号会不会是问题?---

以下还有些输出,我放在回帖里。方便大家阅读。

先谢过给予帮助的同道。

/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rails-settings-cached-0.6.5/lib/rails-settings/default.rb:41:in `initialize'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rails-settings-cached-0.6.5/lib/rails-settings/default.rb:34:in `new'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rails-settings-cached-0.6.5/lib/rails-settings/default.rb:34:in `instance'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rails-settings-cached-0.6.5/lib/rails-settings/default.rb:22:in `[]'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rails-settings-cached-0.6.5/lib/rails-settings/settings.rb:76:in `[]'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rails-settings-cached-0.6.5/lib/rails-settings/base.rb:35:in `[]'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rails-settings-cached-0.6.5/lib/rails-settings/settings.rb:32:in `rescue in method_missing'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rails-settings-cached-0.6.5/lib/rails-settings/settings.rb:22:in `method_missing'
/var/www/homeland/config/environments/production.rb:30:in `block in <top (required)>'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/railtie.rb:209:in `instance_eval'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/railtie.rb:209: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.0.1/lib/active_support/dependencies.rb:293:in `require'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `block in require'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/engine.rb:600:in `block (2 levels) in <class:Engine>'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/engine.rb:599:in `each'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/engine.rb:599:in `block in <class:Engine>'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/initializable.rb:30:in `instance_exec'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/initializable.rb:30:in `run'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/initializable.rb:44:in `each'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/initializable.rb:54:in `run_initializers'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/application.rb:352:in `initialize!'
/var/www/homeland/config/environment.rb:5:in `<top (required)>'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `block in require'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/application.rb:328:in `require_environment!'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/application.rb:448:in `block in run_tasks_blocks'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/commands/rake_proxy.rb:14:in `block in run_rake_task'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/commands/rake_proxy.rb:11:in `run_rake_task'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/commands.rb:18:in `<top (required)>'
/var/www/homeland/bin/rails:9:in `require'
/var/www/homeland/bin/rails:9:in `<top (required)>'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/spring-2.0.1/lib/spring/client/rails.rb:28:in `load'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/spring-2.0.1/lib/spring/client/rails.rb:28:in `call'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/spring-2.0.1/lib/spring/client/command.rb:7:in `call'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/spring-2.0.1/lib/spring/client.rb:30:in `run'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/spring-2.0.1/bin/spring:49:in `<top (required)>'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/spring-2.0.1/lib/spring/binstub.rb:31:in `load'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/spring-2.0.1/lib/spring/binstub.rb:31:in `<top (required)>'
/var/www/homeland/bin/spring:13:in `require'
/var/www/homeland/bin/spring:13:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
NoMethodError: undefined method `asset_host' for Setting (call 'Setting.connection' to establish a connection):Class
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.1/lib/active_record/dynamic_matchers.rb:21:in `method_missing'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/rails-settings-cached-0.6.5/lib/rails-settings/settings.rb:23:in `method_missing'
/var/www/homeland/config/environments/production.rb:30:in `block in <top (required)>'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/railtie.rb:209:in `instance_eval'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/railtie.rb:209: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.0.1/lib/active_support/dependencies.rb:293:in `require'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `block in require'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/engine.rb:600:in `block (2 levels) in <class:Engine>'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/engine.rb:599:in `each'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/engine.rb:599:in `block in <class:Engine>'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/initializable.rb:30:in `instance_exec'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/initializable.rb:30:in `run'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/initializable.rb:44:in `each'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/initializable.rb:54:in `run_initializers'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/application.rb:352:in `initialize!'
/var/www/homeland/config/environment.rb:5:in `<top (required)>'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `block in require'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/application.rb:328:in `require_environment!'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/application.rb:448:in `block in run_tasks_blocks'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/commands/rake_proxy.rb:14:in `block in run_rake_task'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/commands/rake_proxy.rb:11:in `run_rake_task'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/railties-5.0.1/lib/rails/commands.rb:18:in `<top (required)>'
/var/www/homeland/bin/rails:9:in `require'
/var/www/homeland/bin/rails:9:in `<top (required)>'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/spring-2.0.1/lib/spring/client/rails.rb:28:in `load'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/spring-2.0.1/lib/spring/client/rails.rb:28:in `call'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/spring-2.0.1/lib/spring/client/command.rb:7:in `call'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/spring-2.0.1/lib/spring/client.rb:30:in `run'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/spring-2.0.1/bin/spring:49:in `<top (required)>'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/spring-2.0.1/lib/spring/binstub.rb:31:in `load'
/var/www/homeland/vendor/bundle/ruby/2.4.0/gems/spring-2.0.1/lib/spring/binstub.rb:31:in `<top (required)>'
/var/www/homeland/bin/spring:13:in `require'
/var/www/homeland/bin/spring:13:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Tasks: TOP => db:migrate => environment

怎么会有安装 Gem 的步骤啊,Docker 打包好了的,不会有那个步骤的,你这看起来像是用源代码部署了

Docker 没有成功用那个 url 安装,连不上。最后用 docker 的文档装的。试了了 docker info。

huacnlee 回复

这个是执行 sudo make install 之后,下载的情况。

你必须用 homeland-docker 这个项目来安装,不能直接用 Docker Image,因为 homeland-docker 这个项目里面包含必要的配置文件。

https://github.com/ruby-china/homeland-docker

需要 登录 后方可回复, 如果你还没有账号请 注册新账号