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

时间:2022-03-05 20:04:34

I have been going through a lot of trouble trying to get the SQLite gem working in my Rails project.

我一直在努力让SQLite gem在我的Rails项目中运行时遇到很多麻烦。

After a lot of looking, I found a tutorial to help fix my problem, at least, I though it would fix my problem. It let me actually install the gem, which really didn't help me much. When I put it in my gemfile, bundle install does one of three things:

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

  1. It completely ignores the gem.
  2. 它完全忽略了宝石。
  3. It runs into an error building the gem native extensions.
  4. 它遇到了构建gem原生扩展的错误。
  5. Something else that I forgot to mention, because sometimes something random happens.
  6. 我忘了提到的其他东西,因为有时会发生随机的事情。

Any help here is welcome.

欢迎任何帮助。

My Gemfile and Gemfile.lock: http://pastebin.com/h9g4S7YM (also show below):

我的Gemfile和Gemfile.lock:http://pastebin.com/h9g4S7YM(也在下面显示):

Gemfile:

的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:

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)

A Screenshot of what happens (usually) after bundle install, and what the actual error is: http://imgur.com/G7tFl4W (also shown below)

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

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

1 个解决方案

#1


0  

Are you running a 64-bit version of Windows? The latest released version of Bundler doesn't support this platform yet, but the next version will. Try upgrading to the latest pre-release version of Bundler:

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

gem install --pre bundler

Then run bundle install again.

然后再次运行bundle install。

#1


0  

Are you running a 64-bit version of Windows? The latest released version of Bundler doesn't support this platform yet, but the next version will. Try upgrading to the latest pre-release version of Bundler:

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

gem install --pre bundler

Then run bundle install again.

然后再次运行bundle install。