Skip to main content

Deploying Rails App on UBUNTU Server - ERROR

General • Asked by Menj Villalobos

Hi anyone encountered same issue/error?

deploy:assets:precompile
      01 /home/deploy/.rbenv//bin/rbenv exec bundle exec rake assets:precompile
      01 rake aborted!
      01 Psych::SyntaxError: (<unknown>): found character that cannot start any token while scanning for the next token at line 2 column 1
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:391:in `secrets'
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:171:in `key_generator'
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:202:in `message_verifier'
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/globalid-0.3.7/lib/global_id/railtie.rb:25:in `block (2 levels) in <class:Railtie>'
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application/finisher.rb:65:in `block in <module:Finisher>'
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `instance_exec'
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `run'
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:54:in `run_initializers'
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:352:in `initialize!'
      01 /home/deploy/myapp/releases/20160831141545/config/environment.rb:5:in `<top (required)>'
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:328:in `require'
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:328:in `require_environment!'
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:448:in `block in run_tasks_blocks'
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/sprockets-rails-3.1.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
      01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
      01 /home/deploy/.rbenv/versions/2.3.1/bin/bundle:22:in `load'
      01 /home/deploy/.rbenv/versions/2.3.1/bin/bundle:22:in `<main>'
      01 Tasks: TOP => environment
      01 (See full trace by running task with --trace)
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy@139.59.226.191: rake exit status: 1
rake stdout: Nothing written
rake stderr: rake aborted!
Psych::SyntaxError: (<unknown>): found character that cannot start any token while scanning for the next token at line 2 column 1
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:391:in `secrets'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:171:in `key_generator'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:202:in `message_verifier'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/globalid-0.3.7/lib/global_id/railtie.rb:25:in `block (2 levels) in <class:Railtie>'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application/finisher.rb:65:in `block in <module:Finisher>'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `instance_exec'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `run'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:54:in `run_initializers'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:352:in `initialize!'
/home/deploy/myapp/releases/20160831141545/config/environment.rb:5:in `<top (required)>'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:328:in `require'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:328:in `require_environment!'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:448:in `block in run_tasks_blocks'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/sprockets-rails-3.1.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/home/deploy/.rbenv/versions/2.3.1/bin/bundle:22:in `load'
/home/deploy/.rbenv/versions/2.3.1/bin/bundle:22:in `<main>'
Tasks: TOP => environment
(See full trace by running task with --trace)

SSHKit::Command::Failed: rake exit status: 1
rake stdout: Nothing written
rake stderr: rake aborted!
Psych::SyntaxError: (<unknown>): found character that cannot start any token while scanning for the next token at line 2 column 1
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:391:in `secrets'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:171:in `key_generator'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:202:in `message_verifier'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/globalid-0.3.7/lib/global_id/railtie.rb:25:in `block (2 levels) in <class:Railtie>'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application/finisher.rb:65:in `block in <module:Finisher>'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `instance_exec'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `run'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:54:in `run_initializers'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:352:in `initialize!'
/home/deploy/myapp/releases/20160831141545/config/environment.rb:5:in `<top (required)>'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:328:in `require'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:328:in `require_environment!'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:448:in `block in run_tasks_blocks'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/sprockets-rails-3.1.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/home/deploy/.rbenv/versions/2.3.1/bin/bundle:22:in `load'
/home/deploy/.rbenv/versions/2.3.1/bin/bundle:22:in `<main>'
Tasks: TOP => environment
(See full trace by running task with --trace)

Tasks: TOP => deploy:assets:precompile
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as deploy@139.59.226.191: rake exit status: 1
rake stdout: Nothing written
rake stderr: rake aborted!
Psych::SyntaxError: (<unknown>): found character that cannot start any token while scanning for the next token at line 2 column 1
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:391:in `secrets'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:171:in `key_generator'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:202:in `message_verifier'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/globalid-0.3.7/lib/global_id/railtie.rb:25:in `block (2 levels) in <class:Railtie>'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application/finisher.rb:65:in `block in <module:Finisher>'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `instance_exec'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `run'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:54:in `run_initializers'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:352:in `initialize!'
/home/deploy/myapp/releases/20160831141545/config/environment.rb:5:in `<top (required)>'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:328:in `require'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:328:in `require_environment!'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:448:in `block in run_tasks_blocks'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/sprockets-rails-3.1.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/home/deploy/.rbenv/versions/2.3.1/bin/bundle:22:in `load'
/home/deploy/.rbenv/versions/2.3.1/bin/bundle:22:in `<main>'
Tasks: TOP => environment
(See full trace by running task with --trace)

** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:

/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application/finisher.rb:65:in `block in <module:Finisher>'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `instance_exec'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `run'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:54:in `run_initializers'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:352:in `initialize!'
/home/deploy/myapp/releases/20160831141545/config/environment.rb:5:in `<top (required)>'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:328:in `require'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:328:in `require_environment!'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:448:in `block in run_tasks_blocks'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/sprockets-rails-3.1.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/home/deploy/.rbenv/versions/2.3.1/bin/bundle:22:in `load'
/home/deploy/.rbenv/versions/2.3.1/bin/bundle:22:in `<main>'
 DEBUG [f70899a3]       Tasks: TOP => environment
 DEBUG [f70899a3]       (See full trace by running task with --trace)

Thank you!


I got it!

Don't add "tabs" on your database.yml & secrets.yml

;)


🙌

I hadn't realized that tabs were not valid yaml and only spaces are. The more you know!


:D yeah! Maybe this is just based on Rails5 or what? I'm not even sure hahaha!


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 27,623+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.