当前位置: 首页 > 知识库问答 >
问题:

将Rails应用程序部署到Heroku时出错

能可人
2023-03-14

我正在尝试将我的应用程序部署到Heroku,但似乎存在一些问题。每次我尝试:

git push heroku master

我的heroku日志告诉我,我的应用程序崩溃了,我错过了“调试器”宝石。我在Heroku上找到了这条线索和这一页。当我尝试安装“byebug”gem时,bundle告诉我它不会安装在Ruby 1.9.3上,当我按照Heroku的建议将“debugger”gem放在gem文件的开发组中时,我仍然会收到相同的错误。

我也更新了我的bin/rails,bin/rake和bin/bundle文件根据这个线程,但没有用。

我的heroku日志:

2015-09-13T13:49:23.849824+00:00 heroku[web.1]: Process exited with status 0
2015-09-13T13:49:23.863155+00:00 heroku[web.1]: State changed from starting to crashed
2015-09-13T14:04:45.333599+00:00 heroku[slug-compiler]: Slug compilation started
2015-09-13T14:04:45.333617+00:00 heroku[slug-compiler]: Slug compilation finished
2015-09-13T14:04:45.274914+00:00 heroku[api]: Deploy 96bfb3a by lj_nissen@gmx.de
2015-09-13T14:04:45.275022+00:00 heroku[api]: Release v21 created by lj_nissen@gmx.de
2015-09-13T14:04:46.116335+00:00 heroku[web.1]: State changed from crashed to starting
2015-09-13T14:04:53.209874+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 16268 -e production`
2015-09-13T14:04:59.039827+00:00 app[web.1]: [DEPRECATION] requiring "RMagick" is deprecated. Use "rmagick" instead
2015-09-13T14:04:59.346436+00:00 app[web.1]: => Booting WEBrick
2015-09-13T14:04:59.346441+00:00 app[web.1]: => Rails 4.0.13 application starting in production on http://0.0.0.0:16268
2015-09-13T14:04:59.346443+00:00 app[web.1]: => Run `rails server -h` for more startup options
2015-09-13T14:04:59.346444+00:00 app[web.1]: => Ctrl-C to shutdown server
2015-09-13T14:04:59.346445+00:00 app[web.1]: You're missing the 'debugger' gem. Add it to your Gemfile, bundle, and try again.
2015-09-13T14:04:59.346490+00:00 app[web.1]: Exiting
2015-09-13T14:05:00.403110+00:00 heroku[web.1]: State changed from starting to crashed
2015-09-13T14:05:00.404488+00:00 heroku[web.1]: State changed from crashed to starting
2015-09-13T14:05:00.389462+00:00 heroku[web.1]: Process exited with status 0
2015-09-13T14:05:07.914037+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 3507 -e production`
2015-09-13T14:05:14.080304+00:00 app[web.1]: [DEPRECATION] requiring "RMagick" is deprecated. Use "rmagick" instead
2015-09-13T14:05:14.276459+00:00 app[web.1]: You're missing the 'debugger' gem. Add it to your Gemfile, bundle, and try again.
2015-09-13T14:05:14.276512+00:00 app[web.1]: Exiting
2015-09-13T14:05:14.276457+00:00 app[web.1]: => Ctrl-C to shutdown server
2015-09-13T14:05:14.276456+00:00 app[web.1]: => Run `rails server -h` for more startup options
2015-09-13T14:05:14.276455+00:00 app[web.1]: => Rails 4.0.13 application starting in production on http://0.0.0.0:3507
2015-09-13T14:05:14.276452+00:00 app[web.1]: => Booting WEBrick
2015-09-13T14:05:15.122910+00:00 heroku[web.1]: State changed from starting to crashed
2015-09-13T14:05:15.107610+00:00 heroku[web.1]: Process exited with status 0

我的档案:

source 'https://rubygems.org'

ruby '1.9.3'

gem 'shopeng', '0.0.1', :path => './vendor/shopeng' 

#gem "shopeng", :git => "git@github.com:ljnissen/shop_engine.git"

gem 'therubyracer'

gem 'less-rails', '~> 2.7.0'
#gem 'less'
#gem 'bootstrap-sass'

gem 'twitter-bootstrap-rails'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.13'

# Use sqlite3 as the database for Active Recor
gem 'pg' 

# Use SCSS for stylesheets


# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

gem 'carrierwave'

gem 'rmagick'

#gem 'linecache19', '0.5.12'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

group :development, :test do
  gem 'debugger'
end

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

#Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'

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

我的Ruby版本是1.9.3-p551

Rails 4.0.13

我在Mac OS X Yosemite上。

任何帮助都将不胜感激。

共有1个答案

朱典
2023-03-14

在重新部署到Heroku之前,您应该捆绑安装

 类似资料:
  • 我有一个vuejs应用程序,它是用vue cli设置的,我正在尝试将我的应用程序部署到Heroku。 这是我的服务器: 我从gitignore中删除dist, 我在package.json中添加了一个类似“start”的起始点:“node server.js” 以下是我在控制台看到的内容: 加载资源失败:服务器响应,状态为503(服务不可用)/Favicon.ico:1 以下是heroku日志:

  • 在Heroku上部署Node.js应用程序时,我遇到以下错误。 2017-04-18T18:40:10.158442+00:00APP[Web1]:npm错误!请在任何支持请求中包含以下文件: 2017-04-18T18:40:10.158544+00:00APP[Web1]:npm错误!/app/npm-debug.log 2017-04-18T18:40:10.237236+00:00 Her

  • 我正在尝试部署一个运行在puma和jruby上的rails应用程序。程序文件如下所示 彪马的配置放在 配置/puma.rb 我对工人有条件初始化的原因是因为Heroku抱怨(或者可能是彪马)工人模式不适用于JRuby和Windows;无论如何, 我在heroku上注意到的奇怪行为是(与我的本地环境不同),集群Puma实例启动时没有任何问题,并选择两个不同的端口来绑定,即3000和5000。 但是,

  • 问题内容: 我正在尝试在Heroku上使用Flask开发我的第一个“大型”应用程序,并尝试将此处的基本教程与以下说明结合:https : //devcenter.heroku.com/articles/python与以下说明:http:// flask.pocoo.org/docs/patterns/packages/#larger- applications。它在本地与“先行启动”一起工作,但是

  • 我正试图将我的spring应用程序部署到heroku,但我相信maven插件中存在一些错误。尝试了所有可能的版本组合,在本地工作,但在部署时不工作。 当我跑步的时候: git push heroku master 以下是错误: 4.0.0 org.springframework.Boot Spring-Boot-starter-parent 2.3.3.发布com.project techupda

  • 我正试图将Rails应用程序部署到heroku,但出现了一个错误,如下所示。我也在整理我的档案。 宝石文件将保留安装在 /tmp/build_232b9vaemz20q/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.7以供检查。结果记录到 /tmp/build_232b9vaemz20q/vendor/bundle/ruby/1.9.1/gems/sqlite