ruby-on-rails - 我们很抱歉,但有些不对劲。 – 英雄库

标签 ruby-on-rails sqlite postgresql heroku

Heroku 给我“很抱歉,但出了点问题”。

我正在尝试将我的 Rails 项目部署到 Heroku,它是基于 sqlite 的。

我的 gem 文件中有这些文件来修复以前的问题

 group :production do
   gem 'pg'
   gem 'rails_12factor'
 end

这是Heroku提供的日志,到目前为止没有错误

          -----> Removing .DS_Store files
          -----> Ruby app detected
          -----> Compiling Ruby/Rails
          -----> Using Ruby version: ruby-2.0.0
          -----> Installing dependencies using 1.6.3
                 Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
                 Fetching gem metadata from https://rubygems.org/..........
                 Fetching additional metadata from https://rubygems.org/..
                 Fetching git://github.com/thoughtbot/paperclip.git
                 Installing rake 10.3.2
                 Installing i18n 0.6.9
                 Installing minitest 5.3.5
                 Installing thread_safe 0.3.4
                 Installing builder 3.2.2
                 Installing erubis 2.7.0
                 Installing rack 1.5.2
                 Installing mime-types 1.25.1
                 Installing json 1.8.1
                 Installing polyglot 0.3.5
                 Installing arel 5.0.1.20140414130214
                 Installing sass 3.2.19
                 Installing thor 0.19.1
                 Installing execjs 2.2.0
                 Installing coffee-script-source 1.7.0
                 Installing orm_adapter 0.5.0
                 Installing highline 1.6.21
                 Installing hike 1.2.3
                 Installing multi_json 1.10.1
                 Installing icalendar 2.1.0
                 Installing options 2.3.2
                 Using bundler 1.6.3
                 Installing bcrypt 3.1.7
                 Installing tilt 1.4.1
                 Installing rails_serve_static_assets 0.0.2
                 Installing rails_stdout_logging 0.0.3
                 Installing will_paginate 3.0.6
                 Installing tzinfo 1.2.1
                 Installing rack-test 0.6.2
                 Installing warden 1.2.3
                 Installing rdoc 4.1.1
                 Installing treetop 1.4.15
                 Installing bourbon 3.2.3
                 Installing uglifier 2.5.1
                 Installing coffee-script 2.2.0
                 Installing progress_bar 1.0.2
                 Installing rails_12factor 0.0.2
                 Installing sprockets 2.11.0
                 Installing sdoc 0.4.0
                 Installing activesupport 4.1.1
                 Installing mail 2.5.4
                 Installing actionview 4.1.1
                 Installing climate_control 0.0.3
                 Installing activemodel 4.1.1
                 Installing jbuilder 2.1.1
                 Installing actionpack 4.1.1
                 Installing cocaine 0.5.4
                 Installing activerecord 4.1.1
                 Installing actionmailer 4.1.1
                 Installing sprockets-rails 2.1.3
                 Installing railties 4.1.1
                 Using paperclip 4.1.1 from git://github.com/thoughtbot/paperclip.git (at master)
                 Installing coffee-rails 4.0.1
                 Installing devise 3.2.4
                 Installing jquery-rails 3.1.0
                 Installing sass-rails 4.0.3
                 Installing rails 4.1.1
                 Installing turbolinks 2.2.2
                 Installing rails4-autocomplete 1.1.0
                 Installing pg 0.17.1
                 Your bundle is complete!
                 Gems in the groups development and test were not installed.
                 It was installed into ./vendor/bundle
                 Post-install message from icalendar:
                 HEADS UP! iCalendar 2.0 is not backwards-compatible with 1.x. Please see the README for the new syntax
                 Post-install message from rdoc:
                 Depending on your version of ruby, you may need to install ruby rdoc/ri data:
                 <= 1.8.6 : unsupported
                 = 1.8.7 : gem install rdoc-data; rdoc-data --install
                 = 1.9.1 : gem install rdoc-data; rdoc-data --install
                 >= 1.9.2 : nothing to do! Yay!
                 Bundle completed (19.02s)
                 Cleaning up the bundler cache.
          -----> Preparing app for Rails asset pipeline
                 Running: rake assets:precompile
                 I, [2014-07-04T11:09:44.994721 #1465]  INFO -- : Writing /tmp/build_015830e2-6769-413c-ae17-3c1d1e403a36/public/assets/application-ef6d9188f03ae958e0e7ebf51fab00fb.js
                 I, [2014-07-04T11:09:55.195306 #1465]  INFO -- : Writing /tmp/build_015830e2-6769-413c-ae17-3c1d1e403a36/public/assets/application-dd93fb9eaa145c8045a2b6bf97786a72.css
                 Asset precompilation completed (19.06s)
                 Cleaning assets
                 Running: rake assets:clean
          -----> WARNINGS:
                 You have not declared a Ruby version in your Gemfile.
                 To set your Ruby version add this line to your Gemfile:
                 ruby '2.0.0'
                 # See https://devcenter.heroku.com/articles/ruby-versions for more information.

                 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, 50.3MB
          -----> Launching... done, v6
                 http://confguide.herokuapp.com/ deployed to Heroku

最佳答案

从日志看来您还没有运行 rake db:migrate

对于 Heroku 运行以下命令

heroku run rake db:migrate

https://devcenter.heroku.com/articles/getting-started-with-rails3#rake-and-database-migrations

关于ruby-on-rails - 我们很抱歉,但有些不对劲。 – 英雄库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24573118/

相关文章:

ruby-on-rails - 奇怪的路由

ruby-on-rails - Rails 5.2.3/Heroku - 为什么不能在开发模式下使用 squlite3 在生产模式下运行 postgres?

c - fgets 函数的行为很奇怪

php - PostgreSQL LISTEN/NOTIFY 不工作

mysql - 执行 SELECT MAX(id) 等查找最后插入的行在概念上是否正确?

jquery - 复选框显示为未选中状态,尽管已选中

sql - 在无关列上的 Postgresql 错误中选择 Distinct

Android - SQLite 数据库存储在哪里

sqlite - 如何计算 SQLite 中值的中位数?

java - Spring MVC - 在浏览器中显示来自数据库的数据