无法将rails应用程序部署到heroku(安装linecache19时出错(0.5.12)

时间:2013-02-03 18:58:29

标签: ruby-on-rails heroku

我正在尝试将我的铁路应用程序上传到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'

但它似乎没有解决问题。

有人可以提供建议吗?提前感谢您的帮助。 p.s。:真的很抱歉新手问题,我是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'

1 个答案:

答案 0 :(得分:3)

linecache19是用于调试目的的gem。在生产中不需要它,所以你应该将它从生产中使用的宝石中排除。

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

group :development, :test do
  gem 'sqlite3'
  gem 'ruby-debug19', :require => 'ruby-debug'
  gem 'linecache19', :git => 'git://github.com/mark-moseley/linecache'
end
相关问题