部署 heroku 成功 push,无错误提示,但是网站无法显示提示有误

tailang · 2013年07月18日 · 最后由 linsk 回复于 2013年07月19日 · 3219 次阅读

我尝试了多次,但还是没找到原因
下面是 log:

Counting objects: 9, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 594 bytes, done.
Total 6 (delta 4), reused 0 (delta 0)

-----> Ruby/Rails app detected
-----> Using Ruby version: ruby-1.9.3
-----> Installing dependencies using Bundler version 1.3.2
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
       Fetching gem metadata from https://rubygems.org/..........
       Fetching gem metadata from https://rubygems.org/..
       Using rake (10.1.0)
       Using i18n (0.6.1)
       Using multi_json (1.7.7)
       Using activesupport (3.2.13)
       Using builder (3.0.4)
       Using activemodel (3.2.13)
       Using erubis (2.7.0)
       Using journey (1.0.4)
       Using rack (1.4.5)
       Using rack-cache (1.2)
       Using rack-test (0.6.2)
       Using hike (1.2.3)
       Using tilt (1.4.1)
       Using sprockets (2.2.2)
       Using actionpack (3.2.13)
       Using mime-types (1.23)
       Using polyglot (0.3.3)
       Using treetop (1.4.14)
       Using mail (2.5.4)
       Using actionmailer (3.2.13)
       Using arel (3.0.2)
       Using tzinfo (0.3.37)
       Using activerecord (3.2.13)
       Using activeresource (3.2.13)
       Using bundler (1.3.2)
       Using rack-ssl (1.3.3)
       Using json (1.8.0)
       Using rdoc (3.12.2)
       Using thor (0.18.1)
       Using railties (3.2.13)
       Using rails (3.2.13)
       Using acts-as-taggable-on (2.4.1)
       Using acts_as_commentable (3.0.1)
       Using bcrypt-ruby (3.0.1)
       Using sass (3.2.9)
       Using bootstrap-sass (2.3.2.0)
       Installing will_paginate (3.0.4)
       Installing bootstrap-will_paginate (0.0.9)
       Using coderay (1.0.9)
       Using coffee-script-source (1.6.3)
       Using execjs (1.4.0)
       Using coffee-script (2.2.0)
       Using coffee-rails (3.2.2)
       Using orm_adapter (0.4.0)
       Using warden (1.2.1)
       Using devise (2.2.4)
       Using jquery-rails (3.0.4)
       Using mysql2 (0.3.11)
       Using redcarpet (3.0.0)
       Using sass-rails (3.2.6)
       Using uglifier (2.1.1)
       Your bundle is complete! It was installed into ./vendor/bundle
       Cleaning up the bundler cache.
       Removing will_paginate (3.0.3)
       Removing bootstrap-will_paginate (0.0.6)
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       Asset precompilation completed (31.80s)
-----> Rails plugin injection
       Injecting rails_log_stdout
       Injecting rails3_serve_static_assets
-----> Discovering process types
       Procfile declares types      -> (none)
       Default types for Ruby/Rails -> console, rake, web, worker

-----> Compiled slug size: 21.0MB
-----> Launching... done, v11
       http://serene-forest-8140.herokuapp.com deployed to Heroku

To [email protected]:serene-forest-8140.git
   dd0bf3f..3c43bf4  master -> master

浏览器显示:

先看看你的 app 能在本地跑起来吗?然后可以 heroku logs 看看到底什么地方报错了

刚看到这行:Using mysql2 (0.3.11) 貌似你没有用 pg,heroku 上面不能使用 mysql

@yorzi 本地可以,我以前用 mysql 可以运行的,那我用 pg 试试 谢谢

Provision a MySQL Add-on

If your application is using MySQL-specific features, there are a number of MySQL providers in the Heroku Add-ons marketplace you can use instead of Heroku Postgres. Please see the add-on documentation for provisioning instructions as they vary by provider.

https://devcenter.heroku.com/articles/heroku-mysql

@yorzi 换成 pg 现在可以了,非常感谢。刚刚看了前辈的链接了,记得 3 月份的时候我用 mysql 可以,那时只知道 sqlite 不行。

#5 楼 @tailang Heroku 没支持过 Mysql 通过第三方 Add-on 支持

需要 登录 后方可回复, 如果你还没有账号请 注册新账号