我不知道为什么我的网站显示“Applicaiton Error”我在日志中没有看到任何问题。我已经按照heroku站点中指定的步骤添加“pg”gem并运行rake db:create和rake db:migrate但是即使应用程序在我的localhost上正常运行,我仍然在推送到heroku时出错。这是我从heroku的日志:
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Warning:
Removing `Gemfile.lock` because it was generated on Windows.
Bundler will do a full resolve so native gems are handled properly.
This may result in unexpected gem versions being used in your app.
In rare occasions Bundler may not be able to resolve your dependencies at all.
https://devcenter.heroku.com/articles/bundler-windows-gemfile
-----> Installing dependencies using 1.5.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Using i18n (0.6.9)
Using minitest (4.7.5)
Using multi_json (1.9.2)
Using thread_safe (0.3.3)
Using tzinfo (0.3.39)
Using builder (3.1.4)
Using rake (10.2.2)
Using erubis (2.7.0)
Using mime-types (1.25.1)
Using rack (1.5.2)
Using polyglot (0.3.4)
Using activerecord-deprecated_finders (1.0.3)
Using arel (4.0.2)
Using bcrypt (3.1.7)
Using sass (3.2.19)
Using bundler (1.5.2)
Using json (1.8.1)
Using coffee-script-source (1.7.0)
Using certified (0.1.1)
Using thor (0.19.1)
Using execjs (2.0.2)
Using multipart-post (2.0.0)
Using orm_adapter (0.5.0)
Using tilt (1.4.1)
Using geocoder (1.1.9)
Using gmaps4rails (2.1.2)
Using hike (1.2.3)
Using multi_xml (0.5.5)
Using hashie (2.1.1)
Using subexec (0.2.3)
Using oauth (0.4.7)
Using pg (0.17.1)
Using simple-image-uploader (0.1.5)
Using jwt (0.1.11)
Using activesupport (4.0.2)
Using rack-test (0.6.2)
Using warden (1.2.3)
Using treetop (1.4.15)
Using bootstrap-sass (3.1.1.0)
Using coffee-script (2.2.0)
Using uglifier (2.5.0)
Using faraday (0.9.0)
Using omniauth (1.2.1)
Using sprockets (2.11.0)
Using mini_magick (3.7.0)
Using actionpack (4.0.2)
Using jbuilder (1.5.3)
Using activemodel (4.0.2)
Using mail (2.5.4)
Using oauth2 (0.9.3)
Using omniauth-oauth (1.0.1)
Using railties (4.0.2)
Using sprockets-rails (2.0.1)
Using shareable (0.0.3)
Using activerecord (4.0.2)
Using carrierwave (0.10.0)
Using omniauth-oauth2 (1.1.2)
Using omniauth-twitter (1.0.1)
Using actionmailer (4.0.2)
Using coffee-rails (4.0.1)
Using devise (3.2.4)
Using foundation-rails (5.2.2.0)
Using jquery-rails (3.1.0)
Using sass-rails (4.0.3)
Using omniauth-facebook (1.6.0)
Using omniauth-google-oauth2 (0.2.2)
Using rails (4.0.2)
Using turbolinks (2.2.2)
Using figaro (0.7.0)
Installing rails_serve_static_assets (0.0.2)
Installing rails_stdout_logging (0.0.3)
Installing rails_12factor (0.0.2)
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./vendor/bundle
Bundle completed (16.55s)
Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
Asset precompilation completed (4.79s)
Cleaning assets
Running: rake assets:clean
-----> WARNINGS:
Removing `Gemfile.lock` because it was generated on Windows.
Bundler will do a full resolve so native gems are handled properly.
This may result in unexpected gem versions being used in your app.
In rare occasions Bundler may not be able to resolve your dependencies at all.
https://devcenter.heroku.com/articles/bundler-windows-gemfile
No Procfile detected, using the default web server (webrick)
https://devcenter.heroku.com/articles/ruby-default-web-server
-----> Discovering process types
Procfile declares types -> (none)
Default types for Ruby -> console, rake, web, worker
-----> Compressing... done, 107.3MB
-----> Launching... done, v7
http://protected-springs-8562.herokuapp.com/ deployed to Heroku
答案 0 :(得分:0)
显示一些日志怎么样?你运行heroku logs
时会得到什么?
我猜你没有旋转网络dyno,所以实际上没有任何东西在运行。
试试heroku ps
,让我们知道那里有什么。
如果没有运行,请尝试使用heroku ps:scale web=1
PS。不要在生产中使用默认的webrick Web服务器。