0

capistrano を使用して、rails 3.2.11 アプリを bluehost 共有ホスティングにデプロイしようとしています。このエラーが発生し続けます

 [myapp.com] executing command
*** [err :: myapp.com] rake aborted!
*** [err :: myapp.com] (<unknown>): did not find expected node content while parsing a block node at line 18 column 13
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/application/configuration.rb:115:in `database_configuration'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.11/lib/active_record/railtie.rb:78:in `block (2 levels) in <class:Railtie>'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/lazy_load_hooks.rb:26:in `block in on_load'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/lazy_load_hooks.rb:25:in `each'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/lazy_load_hooks.rb:25:in `on_load'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.11/lib/active_record/railtie.rb:74:in `block in <class:Railtie>'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `instance_exec'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `run'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:55:in `block in run_initializers'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `each'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `run_initializers'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/application.rb:136:in `initialize!'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in `method_missing'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/releases/20130115050636/config/environment.rb:5:in `<top (required)>'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `block in require'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/application.rb:103:in `require_environment!'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/application.rb:297:in `block (2 levels) in initialize_tasks'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/sprockets/assets.rake:93:in `block (2 levels) in <top (required)>'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/sprockets/assets.rake:23:in `invoke_or_reboot_rake_task'
*** [err :: myapp.com] /home2/myappc/rails_apps/myapp/shared/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'

エラーには と表示(<unknown>): did not find expected node content while parsing a block node at line 18 column 13されていますが、実際にどのファイルを参照しているのかわかりません。

これは、database_configuration上記のログ ファイルの 4 行目です。

# Loads and returns the contents of the #database_configuration_file. The
      # contents of the file are processed via ERB before being sent through    
      # YAML::load.                                                             
      def database_configuration
        require 'erb'
        YAML::load(ERB.new(IO.read(paths["config/database"].first)).result)
      end

辺りを見回したところ、YAML 解析エラーの可能性があります。.ymlそこで、これをirbで使用して、問題を引き起こしているファイルがあるかどうかを確認しようとしました

YAML.load_file("filename.yml")

しかし、それらはすべてうまくいきます。

必要に応じて、これは私の Gemfile です

gem 'rails', '3.2.11'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'devise'
gem 'friendly_id', "~> 4.0.9"#, :git => "git://github.com/norman/friendly_id.git"
gem 'simple_form'
gem 'json'
gem 'cancan'
gem 'rqrcode-rails3' #imageqrcodes
gem 'mini_magick'
gem "breadcrumbs_on_rails"

group :production do
  gem 'pg'
  # gem 'thin' # Server used in production
end

group :development, :test do
  gem 'mysql2'
  gem 'capistrano'
  gem 'rvm-capistrano'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
  gem 'twitter-bootstrap-rails'
  gem 'execjs', '1.4.0'
  gem 'therubyracer', :platforms => :ruby
end

gem 'jquery-rails'
4

1 に答える 1

0

問題は私のdatabase.ymlファイルにあることです。私のパスワードは記号で始まりました。逃げ道が見つからなかったので、変えてみたらチャームのようになりました。

于 2013-01-15T20:04:59.540 に答える