尝试部署项目时出错

时间:2014-11-03 14:26:28

标签: ruby-on-rails ruby deployment capistrano

我正在尝试将我的项目部署到我的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本地,我收到以下消息:

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!

1 个答案:

答案 0 :(得分:0)

这似乎很重要:

  

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

Psych是一个YAML解析器。您最近是否编辑过可能具有以下别名引用的YAML文件:

something:
  <<: *default

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

相关问题