2016-07-25 8 views
0

に生産に失敗した私は、生産のアプリでheroku run rake db:migrateを実行しようとするんだけど、次のエラーに実行しています -DBの移行は、Herokuの

heroku run rake db:migrate 
Running rake db:migrate on ⬢ thesenumbersmatter... up, run.9613 
/app/bin/bundle: line 1: syntax error near unexpected token `(' 
/app/bin/bundle: line 1: `ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)' 

ここに私のHerokuのログのスナップショットだ -

2016-07-25T21:10:00.983053+00:00 heroku[web.1]: Process exited with status 0 
2016-07-25T21:10:04.570431+00:00 heroku[web.1]: Starting process with command `bundle exec puma -C config/puma.rb` 
2016-07-25T21:10:06.571961+00:00 app[web.1]: /app/bin/bundle: line 1: `ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)' 
2016-07-25T21:10:06.571944+00:00 app[web.1]: /app/bin/bundle: line 1: syntax error near unexpected token `(' 
2016-07-25T21:10:06.658238+00:00 heroku[web.1]: Process exited with status 2 
2016-07-25T21:10:06.644327+00:00 heroku[web.1]: State changed from crashed to starting 
2016-07-25T21:10:06.643399+00:00 heroku[web.1]: State changed from starting to crashed 
2016-07-25T21:10:12.115987+00:00 heroku[web.1]: Starting process with command `bundle exec puma -C config/puma.rb` 
2016-07-25T21:10:13.691797+00:00 app[web.1]: /app/bin/bundle: line 1: syntax error near unexpected token `(' 
2016-07-25T21:10:13.691814+00:00 app[web.1]: /app/bin/bundle: line 1: `ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)' 
2016-07-25T21:10:13.748988+00:00 heroku[web.1]: Process exited with status 2 
2016-07-25T21:10:40.708442+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by [email protected] 
2016-07-25T21:10:48.439887+00:00 heroku[run.8272]: Awaiting client 
2016-07-25T21:10:48.469049+00:00 heroku[run.8272]: Starting process with command `bundle exec rake db:migrate` 
2016-07-25T21:10:48.680222+00:00 heroku[run.8272]: State changed from starting to up 
2016-07-25T21:10:50.599637+00:00 heroku[run.8272]: Process exited with status 2 
2016-07-25T21:10:50.622277+00:00 heroku[run.8272]: State changed from up to complete 
2016-07-25T21:21:32.953192+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=thesenumbersmatter.herokuapp.com request_id=226e241c-763b-4fcb-985a-c71ef6d8ccaa fwd="209.155.210.42" dyno= connect= service= status=503 bytes= 
2016-07-25T21:21:33.255547+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=thesenumbersmatter.herokuapp.com request_id=20f7db1b-7fb0-47dc-ad61-726cde0b1883 fwd="209.155.210.42" dyno= connect= service= status=503 bytes= 
2016-07-25T21:22:39.707138+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by [email protected] 
2016-07-25T21:22:46.341944+00:00 heroku[run.2340]: Awaiting client 
2016-07-25T21:22:46.378195+00:00 heroku[run.2340]: Starting process with command `bundle exec rake db:migrate` 
2016-07-25T21:22:46.344312+00:00 heroku[run.2340]: State changed from starting to up 
2016-07-25T21:22:48.286888+00:00 heroku[run.2340]: Process exited with status 2 
2016-07-25T21:22:48.300483+00:00 heroku[run.2340]: State changed from up to complete 
2016-07-25T21:30:27.247935+00:00 heroku[api]: Starting process with command `bash` by [email protected] 
2016-07-25T21:30:33.624786+00:00 heroku[run.7831]: Awaiting client 
2016-07-25T21:30:33.656346+00:00 heroku[run.7831]: Starting process with command `bash` 
2016-07-25T21:30:33.804038+00:00 heroku[run.7831]: State changed from starting to up 
2016-07-25T21:34:39.761952+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=thesenumbersmatter.herokuapp.com request_id=45451b08-447b-4e05-851b-ce5f092a0f22 fwd="40.141.196.170" dyno= connect= service= status=503 bytes= 

source 'https://rubygems.org' 

gem 'rails', '4.2.6' 
gem 'puma' 
gem 'pg' 
gem 'sass-rails', '~> 5.0' 
gem 'uglifier', '>= 1.3.0' 
gem 'coffee-rails', '~> 4.1.0' 
gem 'jquery-rails' 
gem 'turbolinks' 
gem 'jbuilder', '~> 2.0' 
gem 'sdoc', '~> 0.4.0', group: :doc 
gem 'activeadmin', github: 'activeadmin' 
gem 'active_material', github: 'vigetlabs/active_material' 
gem 'devise' 
gem 'cancan' 
gem 'draper' 
gem 'pundit' 
gem 'foreman' 
gem 'browserify-rails' 
gem 'simplest_photo', github: 'vigetlabs/simplest_photo' 
gem 'colonel_kurtz_ruby' 

group :development, :test do 
    gem 'pry' 
    gem 'pry-doc' 
end 

group :development do 
    gem 'web-console', '~> 2.0' 
    gem 'spring' 
end 

group :test do 
    gem 'rspec-rails' 
    gem 'shoulda-matchers' 
    gem 'guard-rspec' 
    gem 'capybara' 
    gem 'launchy' 
end 

group :production do 
    gem 'rails_12factor' 
end 

マイアプリ使用され、両方のHerokuの/ nodejsとHerokuの/ルビーBU -

は、ここに私のGemfileですReildコンポーネントが私のホームページに特定のコンポーネントをレンダリングしているので、ildpacks。私はRoRにとって比較的新しく、これは私の最初のStackOverflowに関する質問ですので、私が忘れてしまったことについてはお詫び申し上げます。私はまた、herokuサーバのbashプロンプト内でrails -vを実行すると次のような結果が返ってくることに気が付いたので、根本的に何かが間違っていると思います。 -

Running bash on ⬢ thesenumbersmatter... up, run.6069 
~ $ rails -v 
/app/bin/rails: line 1: begin: command not found 
/app/bin/rails: line 2: syntax error near unexpected token `(' 
/app/bin/rails: line 2: ` load File.expand_path('../spring', __FILE__)' 

ありがとうございました!


編集:ここに私のプーマ設定ファイルがあります。

workers Integer(ENV['WEB_CONCURRENCY'] || 2) 
threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5) 
threads threads_count, threads_count 

preload_app! 

rackup  DefaultRackup 
port  ENV['PORT']  || 3000 
environment ENV['RACK_ENV'] || 'development' 

on_worker_boot do 
    ActiveRecord::Base.establish_connection 
end 
+0

また、自分のアプリケーションが自分の開発環境で完全にうまく動作していることを言及する必要があります。 –

+0

'config/puma.rb'の内容を貼り付けることができますか?構文エラーのようです – kasperite

+0

bin/bundle:行1:' ENV ['BUNDLE_GEMFILE'] || = File.expand_path( '../../ Gemfile '、__FILE__)'あなたの引用にいくつかの問題があるようです。私はそれがENV ['BUNDLE_GEMFILE'] || = File.expand_path( '../../ Gemfile'、__FILE__) – Typpex

答えて

0

だから、それは私のアプリのbinディレクトリ内のすべてのファイル(バンドル、レール、熊手、セットアップ、春は)一番上に次の行を欠落していたことが判明 -

#!/usr/bin/env ruby

私はその行が行方不明だったのか分かりませんが、私が知っていることは、サイトが生産上機能しなくなっていることです。皆さんのお手伝いをありがとうございます。

関連する問題