我刚刚将更新(适用于localhost
)推送到Heroku,我的日志中出现status=500
错误,我的索引页面有We're sorry, but something went wrong.
页面,没有进一步的信息。
以下是来自git push heroku master
的信息:
Counting objects: 3733, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3205/3205), done.
Writing objects: 100% (3733/3733), 7.43 MiB | 1.01 MiB/s, done.
Total 3733 (delta 943), reused 2943 (delta 463)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.4
remote: ###### WARNING:
remote: You have the `.bundle/config` file checked into your repository
remote: It contains local state like the location of the installed bundle
remote: as well as configured git local gems, and other settings that should
remote: not be shared between multiple checkouts of a single repo. Please
remote: remove the `.bundle/` folder from your repo and add it to your `.gitignore` file.
remote: https://devcenter.heroku.com/articles/bundler-configuration
remote:
remote: -----> Installing dependencies using bundler 1.11.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Your Gemfile lists the gem pg (>= 0) more than once.
remote: You should probably keep only one of them.
remote: While it's not a problem now, it could cause errors if you change the version of just one of them later.
remote: Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Using rake 11.1.2
remote: Using json 1.8.3
remote: Using i18n 0.7.0
remote: Using minitest 5.8.4
remote: Using thread_safe 0.3.5
remote: Using builder 3.2.2
remote: Using erubis 2.7.0
remote: Using mini_portile2 2.0.0
remote: Using rack 1.6.4
remote: Using mime-types-data 3.2016.0221
remote: Using arel 6.0.3
remote: Using execjs 2.6.0
remote: Using bcrypt 3.1.11
remote: Using sass 3.4.22
remote: Using coffee-script-source 1.10.0
remote: Using thor 0.19.1
remote: Using concurrent-ruby 1.0.1
remote: Using google-analytics-rails 1.1.0
remote: Using pg 0.18.4
remote: Using bundler 1.11.2
remote: Using tilt 2.0.2
remote: Using tzinfo 1.2.2
remote: Using nokogiri 1.6.7.2
remote: Using rack-test 0.6.3
remote: Using mime-types 3.0
remote: Using autoprefixer-rails 6.3.6
remote: Using uglifier 3.0.0
remote: Using figaro 1.0.0
remote: Using coffee-script 2.4.1
remote: Using sprockets 3.6.0
remote: Using activesupport 4.2.6
remote: Using loofah 2.0.3
remote: Using mail 2.6.4
remote: Using bootstrap-sass 3.3.6
remote: Using rails-deprecated_sanitizer 1.0.3
remote: Using globalid 0.3.6
remote: Using activemodel 4.2.6
remote: Using rails-html-sanitizer 1.0.3
remote: Using rails-dom-testing 1.0.7
remote: Using activejob 4.2.6
remote: Using activerecord 4.2.6
remote: Using actionview 4.2.6
remote: Using actionpack 4.2.6
remote: Using actionmailer 4.2.6
remote: Using railties 4.2.6
remote: Using sprockets-rails 3.0.4
remote: Using simple_form 3.2.1
remote: Using mail_form 1.5.1
remote: Using coffee-rails 4.1.1
remote: Installing orm_adapter 0.5.0
remote: Installing warden 1.2.6
remote: Installing responders 2.2.0
remote: Using jquery-rails 4.1.1
remote: Using rails 4.2.6
remote: Using sass-rails 5.0.4
remote: Using turbolinks 2.5.3
remote: Installing jquery-turbolinks 2.1.0
remote: Installing devise 4.2.0
remote: Bundle complete! 20 Gemfile dependencies, 58 gems now installed.
remote: Gems in the groups development, test and production were not installed.
remote: Bundled gems are installed into ./vendor/bundle.
remote: Bundle completed (4.42s)
remote: Cleaning up the bundler cache.
remote: Your Gemfile lists the gem pg (>= 0) more than once.
remote: You should probably keep only one of them.
remote: While it's not a problem now, it could cause errors if you change the version of just one of them later.
remote: Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: Detected manifest file, assuming assets were compiled locally
remote:
remote: ###### WARNING:
remote: You have not declared a Ruby version in your Gemfile.
remote: To set your Ruby version add this line to your Gemfile:
remote: ruby '2.2.4'
remote: # See https://devcenter.heroku.com/articles/ruby-versions for more information.
remote:
remote: ###### WARNING:
remote: You have the `.bundle/config` file checked into your repository
remote: It contains local state like the location of the installed bundle
remote: as well as configured git local gems, and other settings that should
remote: not be shared between multiple checkouts of a single repo. Please
remote: remove the `.bundle/` folder from your repo and add it to your `.gitignore` file.
remote: https://devcenter.heroku.com/articles/bundler-configuration
remote:
remote: ###### WARNING:
remote: No Procfile detected, using the default web server.
remote: We recommend explicitly declaring how to boot your server process via a Procfile.
remote: https://devcenter.heroku.com/articles/ruby-default-web-server
remote:
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote: Default types for buildpack -> console, rake, web, worker
remote:
remote: -----> Compressing...
remote: Done: 182.8M
remote: -----> Launching...
remote: Released v20
remote: https://frozen-lowlands-30190.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/frozen-lowlands-30190.git
5f16820..3583a96 master -> master
这是我得到的status=500
行,没有进一步的解释:
2016-09-07T21:43:17.513968+00:00 heroku[router]: at=info method=GET path="/" host=www.geneticgolf.com request_id=e52af315-b9c6-4029-af51-69deada5b2f3 fwd="70.181.88.50" dyno=web.1 connect=1ms service=33ms status=500 bytes=1754
我已经heroku run rake db:migrate
和heroku restart
,但无济于事。我已经在我的生产组gemfile中安装了rails_12factor
gem。
任何人都可以指出错误的位置或修复方法吗?该网站已上线,因此错误的index
页面很糟糕......
新信息
我网站的暂存链接显然没有出现此问题,只显示指向暂存链接的域名。
答案 0 :(得分:0)
我向Heroku支持发消息,他们说我应该从我的.bundle/config
文件中删除Git
,因为它阻止我的production
宝石被安装,这禁止了rails_12factor
给我有关错误的信息。一旦做出这个改变,heroku logs
实际上开始产生有用的信息,我就能调试。