安装sqlite3(1.3.11)时发生错误,并且Bundler无法继续 [英] An error occurred while installing sqlite3 (1.3.11), and Bundler cannot continue

查看:87
本文介绍了安装sqlite3(1.3.11)时发生错误,并且Bundler无法继续的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我在$ git push heroku master之前尝试尝试$ bundle install --without production,但是我一直收到此错误

So im trying to $ bundle install --without production before I $ git push heroku masterbut i keep getting this error

$ bundle install --without production
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies......
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.3
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.1.8
Using builder 3.2.2
Using erubis 2.7.0
Using actionview 4.1.8
Using rack 1.5.5
Using rack-test 0.6.3
Using actionpack 4.1.8
Using mime-types 2.99
Using mail 2.6.3
Using actionmailer 4.1.8
Using activemodel 4.1.8
Using arel 5.0.1.20140414130214
Using activerecord 4.1.8
Using execjs 2.6.0
Using autoprefixer-rails 6.1.2
Using sass 3.2.19
Using bootstrap-sass 3.3.5
Using bundler 1.10.6
Using coffee-script-source 1.10.0
Using coffee-script 2.4.1
Using thor 0.19.1
Using railties 4.1.8
Using coffee-rails 4.0.1
Using hike 1.2.3
Using multi_json 1.11.2
Using jbuilder 2.3.2
Using jquery-rails 3.1.4
Using tilt 1.4.1
Using sprockets 2.12.4
Using sprockets-rails 2.3.3
Using rails 4.1.8
Using rdoc 4.2.0
Using sass-rails 4.0.5
Using sdoc 0.4.1
Installing sqlite3 1.3.11 with native extensions
C:/jruby-9.0.0.0/lib/ruby/stdlib/rubygems/ext/ext_conf_builder.rb:39: warning: Tempfile#unlink or delete called on open file; ignoring

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    C:/jruby-9.0.0.0/bin/jruby.exe -r ./siteconf20151208-25620-qipdd0.rb extconf.rb
NotImplementedError: C extensions are not supported
    <top> at C:/jruby-9.0.0.0/lib/ruby/stdlib/mkmf.rb:1
  require at org/jruby/RubyKernel.java:940
   (root) at C:/jruby-9.0.0.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
    <top> at extconf.rb:3

extconf failed, exit code 1

Gem files will remain installed in C:/jruby-9.0.0.0/lib/ruby/gems/shared/gems/sqlite3-1.3.11 for inspection.
Results logged to C:/jruby-9.0.0.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.2.0/sqlite3-1.3.11/gem_make.out
An error occurred while installing sqlite3 (1.3.11), and Bundler cannot
continue.
Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.

这是我的Gemfile

this is my Gemfile

source 'https://rubygems.org'

gem 'rails', '4.1.8'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'bootstrap-sass'



group :development, :test do
 gem 'sqlite3'
end

group :production do
 gem 'pg'
 gem 'rails_12factor'
end

group :doc do
    gem 'sdoc', require: false
end

我试图

gem uninstall sqlite3
gem install sqlite

但是我得到了

$ gem install sqlite3
Building native extensions.  This could take a while...
C:/jruby-9.0.0.0/lib/ruby/stdlib/rubygems/ext/ext_conf_builder.rb:39: warning: Tempfile#unlink or delete called on open file; ignoring
ERROR:  Error installing sqlite3:
        ERROR: Failed to build gem native extension.

    C:/jruby-9.0.0.0/bin/jruby.exe -r ./siteconf20151208-19428-iytd2g.rb extconf.rb
NotImplementedError: C extensions are not supported
    <top> at C:/jruby-9.0.0.0/lib/ruby/stdlib/mkmf.rb:1
  require at org/jruby/RubyKernel.java:940
   (root) at C:/jruby-9.0.0.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
    <top> at extconf.rb:3

extconf failed, exit code 1

Gem files will remain installed in C:/jruby-9.0.0.0/lib/ruby/gems/shared/gems/sqlite3-1.3.11 for inspection.
Results logged to C:/jruby-9.0.0.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.2.0/sqlite3-1.3.11/gem_make.out

有人对导致这种情况的原因有任何想法吗?

Does any one have any ideas to what could be causing this?

推荐答案

我认为您需要先安装sqlite3和sqlite3-dev.

I think you need to install sqlite3 and sqlite3-dev first.

sudo apt-get install -y sqlite3 libsqlite3-dev

尝试一下,可能会解决您的问题

Have a try, might solve your problem

这篇关于安装sqlite3(1.3.11)时发生错误,并且Bundler无法继续的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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