Heroku试图安装sqlite3 gem,即使它不在Gemfile中 [英] Heroku is trying to install sqlite3 gem even it not being in the Gemfile

查看:209
本文介绍了Heroku试图安装sqlite3 gem,即使它不在Gemfile中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Heroku上首次部署Rails 3.1应用程序。我将它设置为Cedar堆栈,删除了sqlite3 gem,但是当我将代码推送到Heroku时,出现此错误:


--- - >使用Bundler版本1.1.rc安装依赖项
运行:bundle安装 - 无需开发:test --path vendor / bundle --deployment
http://rubygems.org/ .......(...)



安装rails(3.1 .0)
使用本机扩展安装sqlite3(1.3.4)不幸的是,发生了一个致命错误。请将此错误报告给
Bundler问题跟踪器
https://github.com/carlhuda/bundler/问题,以便我们解决它。
谢谢!
/usr/local/lib/ruby/1.9.1/rubygems/installer.rb:483:in`build in block in build_extensions':错误:无法构建gem原生
扩展名。 (Gem :: Installer :: ExtensionBuildError)
/ usr / local / bin / ruby​​ extconf.rb
检查sqlite3.h ...否

我不知道为什么捆绑安装试图安装sqlite3。看看我的Gemfile和Gemfile.lock:
$ b $ gemfile

$ p $ source'http://rubygems.org'

gem'rails','3.1.0'

gem'json'
gem'pg'
gem'thin'

#默认情况下,Gems仅用于资产,不需要
#在生产环境中。
group:assets do
#gem'sass-rails',〜> 3.1.0
#gem'coffee-rails',〜> 3.1.0
gem'uglifier'
end

gem'jquery-rails'

Gemfile.lock

  GEM remote:http://rubygems.org/ specs:
actionmailer( 3.1.0)
actionpack(= 3.1.0)
邮件(〜> 2.3.0)
actionpack(3.1.0)
activemodel(= 3.1.0)
activesupport(= 3.1.0)
builder(〜> 3.0.0)
erubis(〜> 2.7.0)
i18n(〜> 0.6)$ b $ (〜> 1.3.2)
rack-cache(〜> 1.0.3)
机架安装(〜> 0.8.2)
rack-test(〜> ; 0.6.1)
sprocket(〜> 2.0.0)
activemodel(3.1.0)
activesupport(= 3.1.0)
bcrypt-ruby(〜> 3.0.0)
builder(〜> 3.0.0)
i18n(〜> 0.6)
activerecord(3.1.0)
activemodel(= 3.1.0)
activesupp ort(= 3.1.0)
arel(〜> 2.2.1)
tzinfo(〜> 0.3.29)
activeresource(3.1.0)
activemodel(= 3.1.0)
activesupport(= 3.1.0)
activesupport(3.1.0)
multi_json(〜> 1.0)
arel(2.2.1)
bcrypt-ruby(3.0.1)
builder(3.0。 0)
守护进程(1.1.4)
erubis(2.7.0)
eventmachine(0.12.10)
execjs(1.2.9)
multi_json(〜> ; 1.0)
加息(1.2.1)
i18n(0.6.0)
jquery-rails(1.0.14)
railties(〜> 3.0)
(〜> 0.14)
json(1.6.1)
邮件(2.3.0)
i18n(> = 0.4.0)
mime-types(〜> ; 1.16)
treetop(〜> 1.4.8)
mime-types(1.16)
multi_json(1.0.3)
pg(0.11.0)
(0.3.2)
rack(1.3.3)
rack-cache(1.0.3)
rack(> = 0.4)
rack-mount(0.8.3) )
rack(> = 1.0.0)
rack-ssl(1.3.2)
rack
机架测试(0。 6.1)
rack(> = 1.0)
rails(3.1.0)
actionmailer(= 3.1.0)
actionpack(= 3.1.0)
activerecord (= 3.1.0)
activeresource(= 3.1.0)
activesupport(= 3.1.0)
bundler(〜> 1.0)
railties(= 3.1.0)
railties(3.1.0)
actionpack(= 3.1.0)
activesupport(= 3.1.0)
rack
rdoc(〜> 3.4)
thor(〜> 0.14.6)$ b $($> (0.9.2)
rdoc(3.9.4)
链轮(2.0.0)
远足(〜> 1.2)
rack(〜> 1.0)
tilt(〜> 1.1,!= 1.3.0)
thin(1.2.11)
守护进程(> = 1.0.9)
eventmachine(> = 0.12。 6)
rack(> = 1.0.0)
thor(0.14.6)
tilt(1.3.3)
树梢(1.4.10)
polyglot
polyglot(> = 0.3.1)
tzinfo(0.3.29)
uglifier(1.0.3)
execjs(> = 0.3.0)
multi_json(> = 1.0.2)

平台ruby
$ b $相关附件jquery-rails json pg rails(= 3.1.0)thin uglifier

$ b

我该如何解决它?

解决方案

当我遇到问题时,事实证明我忘记了在 bundle install 之后提交更改。卫生署! git status 应该指示gem文件的非暂存更改。


I'm trying to deploy a Rails 3.1 application for the first time on Heroku. I set it to the Cedar stack, removed the sqlite3 gem but when I push the code to Heroku I get this error:

-----> Installing dependencies using Bundler version 1.1.rc Running: bundle install --without development:test --path vendor/bundle --deployment Fetching gem metadata from http://rubygems.org/....... (...)

Installing rails (3.1.0) Installing sqlite3 (1.3.4) with native extensions Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Thanks! /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) /usr/local/bin/ruby extconf.rb checking for sqlite3.h... no

I've no idea why bundle install is trying to install sqlite3. Take a look at my Gemfile and Gemfile.lock:

Gemfile

source 'http://rubygems.org'

gem 'rails', '3.1.0'

gem 'json'
gem 'pg'
gem 'thin'

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

gem 'jquery-rails'

Gemfile.lock

GEM   remote: http://rubygems.org/   specs:
    actionmailer (3.1.0)
      actionpack (= 3.1.0)
      mail (~> 2.3.0)
    actionpack (3.1.0)
      activemodel (= 3.1.0)
      activesupport (= 3.1.0)
      builder (~> 3.0.0)
      erubis (~> 2.7.0)
      i18n (~> 0.6)
      rack (~> 1.3.2)
      rack-cache (~> 1.0.3)
      rack-mount (~> 0.8.2)
      rack-test (~> 0.6.1)
      sprockets (~> 2.0.0)
    activemodel (3.1.0)
      activesupport (= 3.1.0)
      bcrypt-ruby (~> 3.0.0)
      builder (~> 3.0.0)
      i18n (~> 0.6)
    activerecord (3.1.0)
      activemodel (= 3.1.0)
      activesupport (= 3.1.0)
      arel (~> 2.2.1)
      tzinfo (~> 0.3.29)
    activeresource (3.1.0)
      activemodel (= 3.1.0)
      activesupport (= 3.1.0)
    activesupport (3.1.0)
      multi_json (~> 1.0)
    arel (2.2.1)
    bcrypt-ruby (3.0.1)
    builder (3.0.0)
    daemons (1.1.4)
    erubis (2.7.0)
    eventmachine (0.12.10)
    execjs (1.2.9)
      multi_json (~> 1.0)
    hike (1.2.1)
    i18n (0.6.0)
    jquery-rails (1.0.14)
      railties (~> 3.0)
      thor (~> 0.14)
    json (1.6.1)
    mail (2.3.0)
      i18n (>= 0.4.0)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.16)
    multi_json (1.0.3)
    pg (0.11.0)
    polyglot (0.3.2)
    rack (1.3.3)
    rack-cache (1.0.3)
      rack (>= 0.4)
    rack-mount (0.8.3)
      rack (>= 1.0.0)
    rack-ssl (1.3.2)
      rack
    rack-test (0.6.1)
      rack (>= 1.0)
    rails (3.1.0)
      actionmailer (= 3.1.0)
      actionpack (= 3.1.0)
      activerecord (= 3.1.0)
      activeresource (= 3.1.0)
      activesupport (= 3.1.0)
      bundler (~> 1.0)
      railties (= 3.1.0)
    railties (3.1.0)
      actionpack (= 3.1.0)
      activesupport (= 3.1.0)
      rack-ssl (~> 1.3.2)
      rake (>= 0.8.7)
      rdoc (~> 3.4)
      thor (~> 0.14.6)
    rake (0.9.2)
    rdoc (3.9.4)
    sprockets (2.0.0)
      hike (~> 1.2)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    thin (1.2.11)
      daemons (>= 1.0.9)
      eventmachine (>= 0.12.6)
      rack (>= 1.0.0)
    thor (0.14.6)
    tilt (1.3.3)
    treetop (1.4.10)
      polyglot
      polyglot (>= 0.3.1)
    tzinfo (0.3.29)
    uglifier (1.0.3)
      execjs (>= 0.3.0)
      multi_json (>= 1.0.2)

PLATFORMS   ruby

DEPENDENCIES   jquery-rails   json   pg   rails (= 3.1.0)   thin   uglifier

How can I fix it?

解决方案

When I ran into the problem, turns out I'd forgotten to commit my changes after bundle install. Doh! git status should indicate unstaged changes for the gem files.

这篇关于Heroku试图安装sqlite3 gem,即使它不在Gemfile中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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