0

我过去在尝试执行 git push Heroku master 时遇到以下错误,这是由于

gem 'ruby-debug19', :require => 'ruby-debug'

在我的 Gem 文件中。

An error occurred while installing linecache19 (0.5.12), and Bundler cannot continue.
   Make sure that `gem install linecache19 -v '0.5.12'` succeeds before bundling.

 !     Failed to install gems via Bundler.

 !     Heroku push rejected, failed to compile Ruby/rails app

注释掉 gem 并运行 bundle install 并重新推送通常可以解决问题,但这次不行。

Linecache19 似乎是 ruby​​-debug19 的依赖项,所以我不明白为什么当我从 Gem 文件中删除 ruby​​-debug19 时 Heroku 试图安装 linecache19

我的 gemfile.lock 文件如下:

specs:
activeadmin (0.4.3)
  bourbon (>= 1.0.0)
  devise (>= 1.1.2)
  fastercsv
  formtastic (>= 2.0.0)
  inherited_resources (> 0)
  jquery-rails (>= 1.0.0)
  kaminari (>= 0.13.0)
  meta_search (>= 0.9.2)
  rails (>= 3.0.0)
  sass (>= 3.1.0)

GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.1)
  actionpack (= 3.2.1)
  mail (~> 2.4.0)
actionpack (3.2.1)
  activemodel (= 3.2.1)
  activesupport (= 3.2.1)
  builder (~> 3.0.0)
  erubis (~> 2.7.0)
  journey (~> 1.0.1)
  rack (~> 1.4.0)
  rack-cache (~> 1.1)
  rack-test (~> 0.6.1)
  sprockets (~> 2.1.2)
activemodel (3.2.1)
  activesupport (= 3.2.1)
  builder (~> 3.0.0)
activerecord (3.2.1)
  activemodel (= 3.2.1)
  activesupport (= 3.2.1)
  arel (~> 3.0.0)
  tzinfo (~> 0.3.29)
activeresource (3.2.1)
  activemodel (= 3.2.1)
  activesupport (= 3.2.1)
activesupport (3.2.1)
  i18n (~> 0.6)
  multi_json (~> 1.0)
arel (3.0.0)
bcrypt-ruby (3.0.1)
bourbon (1.4.0)
  sass (>= 3.1)
builder (3.0.0)
coffee-rails (3.2.2)
  coffee-script (>= 2.2.0)
  railties (~> 3.2.0)
coffee-script (2.2.0)
  coffee-script-source
  execjs
coffee-script-source (1.2.0)
commonjs (0.2.6)
devise (2.0.0)
  bcrypt-ruby (~> 3.0)
  orm_adapter (~> 0.0.3)
  railties (~> 3.1)
  warden (~> 1.1)
erubis (2.7.0)
execjs (1.3.0)
  multi_json (~> 1.0)
fastercsv (1.5.4)
foreigner (1.1.2)
  activerecord (>= 3.0.0)
formtastic (2.1.1)
  actionpack (~> 3.0)
has_scope (0.5.1)
hike (1.2.1)
i18n (0.6.0)
inherited_resources (1.3.1)
  has_scope (~> 0.5.0)
  responders (~> 0.6)
journey (1.0.1)
jquery-rails (2.0.0)
  railties (>= 3.2.0.beta, < 5.0)
  thor (~> 0.14)
json (1.6.5)
kaminari (0.13.0)
  actionpack (>= 3.0.0)
  activesupport (>= 3.0.0)
  railties (>= 3.0.0)
less (2.2.1)
  commonjs (~> 0.2.6)
less-rails (2.2.3)
  actionpack (>= 3.1)
  less (~> 2.2.0)
libv8 (3.3.10.4)
macaddr (1.5.0)
  systemu (>= 2.4.0)
mail (2.4.1)
  i18n (>= 0.4.0)
  mime-types (~> 1.16)
  treetop (~> 1.4.8)
meta_search (1.1.3)
  actionpack (~> 3.1)
  activerecord (~> 3.1)
  activesupport (~> 3.1)
  polyamorous (~> 0.5.0)
mime-types (1.17.2)
multi_json (1.0.4)
orm_adapter (0.0.6)
pg (0.12.2)
polyamorous (0.5.0)
  activerecord (~> 3.0)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.1)
  rack (>= 0.4)
rack-ssl (1.3.2)
  rack
rack-test (0.6.1)
  rack (>= 1.0)
rails (3.2.1)
  actionmailer (= 3.2.1)
  actionpack (= 3.2.1)
  activerecord (= 3.2.1)
  activeresource (= 3.2.1)
  activesupport (= 3.2.1)
  bundler (~> 1.0)
  railties (= 3.2.1)
railties (3.2.1)
  actionpack (= 3.2.1)
  activesupport (= 3.2.1)
  rack-ssl (~> 1.3.2)
  rake (>= 0.8.7)
  rdoc (~> 3.4)
  thor (~> 0.14.6)
rake (0.9.2.2)
rdoc (3.12)
  json (~> 1.4)
responders (0.9.0)
  railties (~> 3.1)
sass (3.1.14)
sass-rails (3.2.4)
  railties (~> 3.2.0)
  sass (>= 3.1.10)
  tilt (~> 1.3)
sprockets (2.1.2)
  hike (~> 1.2)
  rack (~> 1.0)
  tilt (~> 1.1, != 1.3.0)
systemu (2.4.2)
therubyracer (0.10.1)
  libv8 (~> 3.3.10)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
  polyglot
  polyglot (>= 0.3.1)
twitter-bootstrap-rails (2.1.1)
  actionpack (>= 3.1)
  less-rails (~> 2.2.2)
  railties (>= 3.1)
  therubyracer (= 0.10.1)
tzinfo (0.3.31)
uglifier (1.2.3)
  execjs (>= 0.3.0)
  multi_json (>= 1.0.2)
uuid (2.3.5)
  macaddr (~> 1.0)
warden (1.1.0)
  rack (>= 1.0)

PLATFORMS
ruby

DEPENDENCIES
activeadmin!
coffee-rails (~> 3.2.1)
devise (= 2.0.0)
foreigner
jquery-rails (>= 1.0.12)
pg
rails (= 3.2.1)
sass-rails (~> 3.2.3)
twitter-bootstrap-rails
uglifier (>= 1.0.3)
uuid

为什么 Heroku 仍在尝试安装 linecache19,我该如何解决这个问题?

例如,我可以清空我的 Heroku 主人并从头开始重新推送吗?(这不是生产,所以我买得起)

4

1 回答 1

0

将调试 gem 放入 Gemfile 中的 :development 组;我不知道有任何方法可以远程调试 Heroku 应用程序,因此在 Heroku 上以“生产”模式部署它们是没有意义的。例子:

group :development do
  gem "ruby-debug-base19x"
end
于 2012-07-31T13:11:09.397 回答