繁体   English   中英

我无法将SQLite3 Gem安装在我的Rails捆绑包中(我可以将其安装为gem,但不能安装在gemfile中)?

[英]I cannot install the SQLite3 Gem in my bundle for rails (I can install it as a gem, but not in my gemfile)?

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

经过一番浏览,我找到了可以帮助解决问题的教程,至少,尽管它可以解决我的问题。 它实际上让我安装了gem,但实际上并没有多大帮助。 当我将其放入gemfile时, bundle install执行以下三项操作之一:

  1. 它完全忽略了宝石。
  2. 构建gem本机扩展时会出错。
  3. 我忘了提及其他内容,因为有时会发生随机事件。

欢迎在这里提供任何帮助。

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

宝石文件:

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 (也如下所示)

在此处输入图片说明

您是否正在运行Windows的64位版本? Bundler的最新发行版本尚不支持此平台,但下一版本将支持该平台。 尝试升级到Bundler的最新预发行版本:

gem install --pre bundler

然后再次运行bundle install

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM