繁体   English   中英

尝试部署项目时出错

[英]Error when trying to deploy project

我正在尝试将项目部署到VPS。 但是我遇到了这个错误:

INFO [6f651f60] Running ~/.rbenv/bin/rbenv exec bundle exec rake assets:precompile on 128.199.60.121
DEBUG [6f651f60] Command: cd /home/deploy/wisemonkeys/releases/20141103141543 && ( RBENV_ROOT=~/.rbenv RBENV_VERSION=2.1.2 RAILS_ENV=production ~/.rbenv/bin/rbenv exec bundle exec rake assets:precompile )
DEBUG [6f651f60]    rake aborted!
DEBUG [6f651f60]    Psych::BadAlias: Unknown alias: default
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/application/configuration.rb:106:in `database_configuration'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/railtie.rb:175:in `block (2 levels) in <class:Railtie>'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:27:in `each'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/railtie.rb:174:in `block in <class:Railtie>'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/releases/20141103141543/config/environment.rb:5:in `<top (required)>'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/application.rb:189:in `require_environment!'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/application.rb:250:in `block in run_tasks_blocks'
DEBUG [6f651f60]    /home/deploy/wisemonkeys/shared/bundle/ruby/2.1.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:54:in `block (2 levels) in define'
DEBUG [6f651f60]    Tasks: TOP => environment
DEBUG [6f651f60]    (See full trace by running task with --trace)
cap aborted!
SSHKit::Command::Failed: rake stdout: Nothing written
rake stderr: Nothing written

如果我在VPS上运行bundle exec rake assets:precompile ,则会遇到相同的错误。

如果我运行bundle exec rake assets:precompile local, bundle exec rake assets:precompile收到以下消息:

alucardu@alucardu-VirtualBox ~/sites/wisemonkeys (frontend-update *) $ rake assets:precompile
rake aborted!
Psych::BadAlias: Unknown alias: default
/home/alucardu/sites/wisemonkeys/config/environment.rb:5:in `<top (required)>'
Tasks: TOP => environment
(See full trace by running task with --trace)

environment.rb

# Load the Rails application.
require File.expand_path('../application', __FILE__)

# Initialize the Rails application.
Wisemonkeys::Application.initialize!

这似乎很重要:

Psych :: BadAlias:未知别名:默认

Psych是YAML解析器。 您最近是否编辑了一个YAML文件,该文件可能具有这样的别名引用:

something:
  <<: *default

但是文件中没有default吗? 也许您的database.mlsecrets.yml吗?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM