0

我正在尝试将我的铁路应用程序上传到 Heroku。我正在使用 Ruby 1.9.3。该应用程序可以在我的本地计算机上正常部署。

 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

我试过将这一行输入到 Gemfile

gem 'linecache19', :git => 'git://github.com/mark-moseley/linecache'

但这似乎并不能解决问题。

有人可以建议吗?预先感谢您的帮助。ps:对于新手的问题真的很抱歉,我在 Ruby on Rails 开发方面还很新。

下面是我完整的 Gemfile


source 'http://rubygems.org'

gem 'rails', '3.1.0'

# Bundle edge Rails instead:
# gem 'rails',     :git => 'git://github.com/rails/rails.git'

# for Heroku deployment - as described in Ap. A of ELLS book
group :development, :test do
 gem 'sqlite3'
 gem 'ruby-debug19', :require => 'ruby-debug'
end
group :production do
 gem 'pg'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
 gem 'therubyracer'              
 gem 'sass-rails', "  ~> 3.1.0"
 gem 'coffee-rails', "~> 3.1.0"
 gem 'uglifier'
end

gem 'jquery-rails'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
gem 'haml'

gem 'linecache19', :git => 'git://github.com/mark-moseley/linecache'
4

1 回答 1

3

linecache19是用于调试目的的 gem。生产中不需要它,因此您应该将其从生产中使用的 gem 中排除。

将其添加到:development, :test文件顶部已有的组中bundle,然后重新部署。

group :development, :test do
  gem 'sqlite3'
  gem 'ruby-debug19', :require => 'ruby-debug'
  gem 'linecache19', :git => 'git://github.com/mark-moseley/linecache'
end
于 2013-02-03T19:29:50.177 回答