即使我已经告诉它不要,Heroku仍然试图安装开发宝石 [英] Heroku's trying to install development gems even after I've told it not to

查看:110
本文介绍了即使我已经告诉它不要,Heroku仍然试图安装开发宝石的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在潜入RoR,并且正在使用Heroku来托管我正在构建的测试应用程序。当我推送到Heroku时,它试图安装linecache19 gem(ruby-debug19 gem使用)时崩溃... ...
$ b

 安装ruby_core_source(0.1.4)
使用本机扩展安装linecache19(0.5.11)/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:483:in` build_extensions':错误:无法构建gem本机扩展。 (Gem :: Installer :: ExtensionBuildError)

在网络搜索完这个问题后,每个人的解决方案...

$ p $ heroku config:add BUNDLE_WITHOUT =测试开发--app app_name

但是,即使在我这样做之后,对Heroku的推动仍然会崩溃。这是我的Gemfile ...

  source'http://rubygems.org'

gem'导轨','3.0.5'
gemcarrierwave
gemmini_magick
gemfog

group:development do
gem' annotate-models','1.0.4'
gem'sqlite3'
gem'ruby-debug19'
gem'sqlite3-ruby',:require => 'sqlite3'
end

我甚至卸载了 ruby​​-debug19 gem,它仍然崩溃并尝试安装linecache19 gem。为什么这条linecache19宝石不会消失?我对这一切都很陌生,因此,我确信我错过了一些明显的东西。您的想法?



感谢您的智慧!

heroku config 命令格式不正确。在 add 之前有空格,并且缺少开发 test之间的冒号
$ b $ p $ heroku config:add BUNDLE_WITHOUT =development:test--app app_name



Google文档就在这里。



另外,你还记得在本地运行 bundle install 并提交你的 Gemfile Gemfile.lock 转换为 git


I'm diving into RoR and I'm using Heroku to host the test app I'm building. When I do a push to Heroku, it crashes when trying to intall the linecache19 gem (which is used by ruby-debug19 gem)...

Installing ruby_core_source (0.1.4) 
Installing linecache19 (0.5.11) with native extensions /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

After searching all over the web for this problem, everyone's solution was...

heroku config: add BUNDLE_WITHOUT="test development" --app app_name

But the push to Heroku still crashes even after I did that. Here's my Gemfile...

source 'http://rubygems.org'

gem 'rails', '3.0.5'
gem "carrierwave"
gem "mini_magick"
gem "fog"

group :development do
  gem 'annotate-models', '1.0.4'
  gem 'sqlite3'
  gem 'ruby-debug19'
  gem 'sqlite3-ruby', :require => 'sqlite3'
end

I even uninstalled the ruby-debug19 gem and it's still crashing and trying to install the linecache19 gem. Why won't this linecache19 gem go away? I'm new to all this and, as such, I'm sure I'm missing something obvious. Your thoughts?

Thanks for your wisdom!

解决方案

Your heroku config command is malformed. You have a space before add and you are missing the colon between development and test.

$ heroku config:add BUNDLE_WITHOUT="development:test" --app app_name

Docs are here.

Also, are you remembering to run bundle install locally and commit both your Gemfile and Gemfile.lock into git?

这篇关于即使我已经告诉它不要,Heroku仍然试图安装开发宝石的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆