我无法在我的bundle for rails中安装SQLite3 Gem(我可以将它安装为gem,但不能安装在我的gemfile中)?

时间:2013-11-26 20:03:04

标签: ruby-on-rails ruby sqlite bundler sqlite3-ruby

我在尝试让SQLite gem在我的Rails项目中工作时遇到了很多麻烦。

经过大量的研究,我发现了一个帮助修复问题的教程,至少,我会解决我的问题。它让我实际安装了宝石,这对我来说真的没什么用。当我把它放在我的gemfile中时,bundle install会做三件事之一:

  1. 它完全忽略了宝石。
  2. 构建gem原生扩展会遇到错误。
  3. 我忘记提及的其他事情,因为有时会发生随意的事情。
  4. 欢迎任何帮助。

    My Gemfile和Gemfile.lock:http://pastebin.com/h9g4S7YM(也显示如下):

    的Gemfile:

    source 'https://rubygems.org'
    ruby '2.0.0'
    #ruby-gemset=railstutorial_rails_4_0
    
    gem 'rails', '4.0.1'
    
    group :development, :test do
      gem 'sqlite3', "1.3.7"
      gem 'rspec-rails', '2.13.1'
    end
    
    group :test do
      gem 'selenium-webdriver', '2.35.1'
      gem 'capybara', '2.1.0'
    end
    
    gem 'sass-rails', '4.0.1'
    gem 'uglifier', '2.1.1'
    gem 'coffee-rails', '4.0.1'
    gem 'jquery-rails', '3.0.4'
    gem 'turbolinks', '1.1.1'
    gem 'jbuilder', '1.0.2'
    
    group :doc do
      gem 'sdoc', '0.3.20', require: false
    end
    
    group :production do
      gem 'pg', '0.15.1'
      gem 'rails_12factor', '0.0.2'
    end
    

    Gemfile.lock的:

    GEM
      remote: https://rubygems.org/
      specs:
        actionmailer (4.0.1)
          actionpack (= 4.0.1)
          mail (~> 2.5.4)
        actionpack (4.0.1)
          activesupport (= 4.0.1)
          builder (~> 3.1.0)
          erubis (~> 2.7.0)
          rack (~> 1.5.2)
          rack-test (~> 0.6.2)
        activemodel (4.0.1)
          activesupport (= 4.0.1)
          builder (~> 3.1.0)
        activerecord (4.0.1)
          activemodel (= 4.0.1)
          activerecord-deprecated_finders (~> 1.0.2)
          activesupport (= 4.0.1)
          arel (~> 4.0.0)
        activerecord-deprecated_finders (1.0.3)
        activesupport (4.0.1)
          i18n (~> 0.6, >= 0.6.4)
          minitest (~> 4.2)
          multi_json (~> 1.3)
          thread_safe (~> 0.1)
          tzinfo (~> 0.3.37)
        arel (4.0.1)
        atomic (1.1.14)
        builder (3.1.4)
        capybara (2.1.0)
          mime-types (>= 1.16)
          nokogiri (>= 1.3.3)
          rack (>= 1.0.0)
          rack-test (>= 0.5.4)
          xpath (~> 2.0)
        childprocess (0.3.9)
          ffi (~> 1.0, >= 1.0.11)
        coffee-rails (4.0.1)
          coffee-script (>= 2.2.0)
          railties (>= 4.0.0, < 5.0)
        coffee-script (2.2.0)
          coffee-script-source
          execjs
        coffee-script-source (1.6.3)
        diff-lcs (1.2.5)
        erubis (2.7.0)
        execjs (2.0.2)
        ffi (1.9.3-x86-mingw32)
        hike (1.2.3)
        i18n (0.6.5)
        jbuilder (1.0.2)
          activesupport (>= 3.0.0)
        jquery-rails (3.0.4)
          railties (>= 3.0, < 5.0)
          thor (>= 0.14, < 2.0)
        json (1.8.1)
        mail (2.5.4)
          mime-types (~> 1.16)
          treetop (~> 1.4.8)
        mime-types (1.25.1)
        mini_portile (0.5.2)
        minitest (4.7.5)
        multi_json (1.8.2)
        nokogiri (1.6.0-x86-mingw32)
          mini_portile (~> 0.5.0)
        pg (0.15.1-x86-mingw32)
        polyglot (0.3.3)
        rack (1.5.2)
        rack-test (0.6.2)
          rack (>= 1.0)
        rails (4.0.1)
          actionmailer (= 4.0.1)
          actionpack (= 4.0.1)
          activerecord (= 4.0.1)
          activesupport (= 4.0.1)
          bundler (>= 1.3.0, < 2.0)
          railties (= 4.0.1)
          sprockets-rails (~> 2.0.0)
        rails_12factor (0.0.2)
          rails_serve_static_assets
          rails_stdout_logging
        rails_serve_static_assets (0.0.1)
        rails_stdout_logging (0.0.3)
        railties (4.0.1)
          actionpack (= 4.0.1)
          activesupport (= 4.0.1)
          rake (>= 0.8.7)
          thor (>= 0.18.1, < 2.0)
        rake (10.1.0)
        rdoc (3.12.2)
          json (~> 1.4)
        rspec-core (2.13.1)
        rspec-expectations (2.13.0)
          diff-lcs (>= 1.1.3, < 2.0)
        rspec-mocks (2.13.1)
        rspec-rails (2.13.1)
          actionpack (>= 3.0)
          activesupport (>= 3.0)
          railties (>= 3.0)
          rspec-core (~> 2.13.0)
          rspec-expectations (~> 2.13.0)
          rspec-mocks (~> 2.13.0)
        rubyzip (0.9.9)
        sass (3.2.12)
        sass-rails (4.0.1)
          railties (>= 4.0.0, < 5.0)
          sass (>= 3.1.10)
          sprockets-rails (~> 2.0.0)
        sdoc (0.3.20)
          json (>= 1.1.3)
          rdoc (~> 3.10)
        selenium-webdriver (2.35.1)
          childprocess (>= 0.2.5)
          multi_json (~> 1.0)
          rubyzip (< 1.0.0)
          websocket (~> 1.0.4)
        sprockets (2.10.1)
          hike (~> 1.2)
          multi_json (~> 1.0)
          rack (~> 1.0)
          tilt (~> 1.1, != 1.3.0)
        sprockets-rails (2.0.1)
          actionpack (>= 3.0)
          activesupport (>= 3.0)
          sprockets (~> 2.8)
        sqlite3 (1.3.7-x86-mingw32)
        thor (0.18.1)
        thread_safe (0.1.3)
          atomic
        tilt (1.4.1)
        treetop (1.4.15)
          polyglot
          polyglot (>= 0.3.1)
        turbolinks (1.1.1)
          coffee-rails
        tzinfo (0.3.38)
        uglifier (2.1.1)
          execjs (>= 0.3.0)
          multi_json (~> 1.0, >= 1.0.2)
        websocket (1.0.7)
        xpath (2.0.0)
          nokogiri (~> 1.3)
    
    PLATFORMS
      x86-mingw32
    
    DEPENDENCIES
      capybara (= 2.1.0)
      coffee-rails (= 4.0.1)
      jbuilder (= 1.0.2)
      jquery-rails (= 3.0.4)
      pg (= 0.15.1)
      rails (= 4.0.1)
      rails_12factor (= 0.0.2)
      rspec-rails (= 2.13.1)
      sass-rails (= 4.0.1)
      sdoc (= 0.3.20)
      selenium-webdriver (= 2.35.1)
      sqlite3 (= 1.3.7)
      turbolinks (= 1.1.1)
      uglifier (= 2.1.1)
    

    捆绑安装后(通常)发生的情况的屏幕截图,以及实际错误:http://imgur.com/G7tFl4W(也显示如下)

    enter image description here

1 个答案:

答案 0 :(得分:0)

您运行的是64位版本的Windows吗?最新发布的Bundler版本尚不支持这个平台,但下一个版本将支持。尝试升级到Bundler的最新预发布版本:

gem install --pre bundler

然后再次运行bundle install