【问题标题】:Error while deploying Rails application to Heroku将 Rails 应用程序部署到 Heroku 时出错
【发布时间】:2015-12-09 15:25:27
【问题描述】:

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

git push heroku master

我的 heroku 日志告诉我,我的应用程序崩溃了,并且我缺少“调试器”gem。我在这里找到了this 线程和Heroku 上的this 页面。当我尝试安装“byebug”gem 时,bundle 告诉我它不会安装在 Ruby 1.9.3 上,当我遵循 Heroku 的建议并将“debugger”gem 放在 Gemfile 的开发组中时,我仍然得到同样的错误。

我还根据this 线程更新了我的 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。

任何帮助将不胜感激。

【问题讨论】:

  • 可以显示你的 Gemfile 吗?
  • 我尝试在生产环境中运行“调试器”gem。没有区别。

标签: ruby-on-rails ruby heroku


【解决方案1】:

在重新部署到 Heroku 之前,您应该 bundle install

【讨论】:

    猜你喜欢
    • 2015-09-22
    • 1970-01-01
    • 2018-05-15
    • 1970-01-01
    • 2017-09-14
    • 2020-04-06
    • 2016-04-08
    • 2019-06-25
    相关资源
    最近更新 更多