RoR部署到heroku出错了,rake db:migrate终于工作了

时间:2013-07-18 20:51:06

标签: ruby-on-rails database heroku rubygems

我目前正在做Michael Hartl的RoR教程,虽然我已经仔细按照说明操作,但我的应用程序没有正确部署到heroku。救命。

My Gemfile看起来像这样

source 'https://rubygems.org'
ruby '1.9.3'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
#ruby-gemset=railstutorial_rails_4_0

gem 'rails', '4.0.0'

group :development, :test do
  gem 'sqlite3', '1.3.7'
  gem 'rspec-rails', '2.13.1'
end

group :test do
  gem 'selenium-webdriver', '2.0.0'
  gem 'capybara', '2.1.0'
end

gem 'sass-rails', '4.0.0'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.0'
gem 'jquery-rails', '2.2.1'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'

group :doc do
gem 'sdoc', '0.3.20', require: false
end

group :production do
  gem 'pg', '0.15.1'
  gem 'rails_12factor', '0.0.2'
end

我输入了以下命令:

$ heroku create
$ git push heroku master
$ heroku run rake db:migrate

然而,我的结局结果如下:http://warm-wildwood-5691.herokuapp.com/ “您正在寻找的页面不存在。”

这些是我的heroku日志

2013-07-19T19:21:15.363798 + 00:00 heroku [router]:at = info code = desc =“Blank app”method = GET path = / host = safe-ridge-7992.herokuapp.com fwd =“190.72.80.97”dyno = connect = service = status = 502 bytes =

2013-07-19T19:21:16.733481 + 00:00 heroku [router]:at = info code = desc =“Blank app”method = GET path = / favicon.ico host = safe-ridge-7992.herokuapp .com fwd =“190.72.80.97”dyno = connect = service = status = 502 bytes =

2013-07-19T19:21:36 + 00:00 heroku [slug-compiler]:Slug编译开始

2013-07-19T19:24:23.872947 + 00:00 heroku [router]:at = info method = GET path = / favicon.ico host = safe-ridge-7992.herokuapp.com fwd =“190.72.80.97 “dyno = web.1 connect = 2ms service = 7ms status = 200 bytes = 0

帮助?

2 个答案:

答案 0 :(得分:0)

首先,您应该检查您的日志。登录您的Heroku帐户并查看日志以获取更多信息。

其次,您是否正确设置了此应用程序的遥控器?

如果没有,请确保您位于控制台的应用程序目录中,并执行以下操作:

git remote rm heroku(如果你已经错误地设置了它。)

然后你可以这样做:

git remote add heroku git@heroku.com:warm-wildwood-5691.git

然后,像以前一样运行git push heroku masterheroku run rake db:migrate

答案 1 :(得分:0)

尝试将我的存储库的分支推送到heroku时遇到了同样的问题。不知何故,这并没有到达"。合并到主人(git)并推高主人然后按预期工作。