Bundler每次都会安装sqlite3,但是Gemfile中没有sqlite

发布于 2024-12-06 17:02:19 字数 6752 浏览 0 评论 0原文

Bundler 每次都会安装 sqlite3,但我没有在我的项目中使用它。我选择了 Postgres,但无法将其部署到 Heroku。 Bundler 就是这样做的原因。为什么会这样?我该怎么办?

我试图为此制作单独的宝石。我清除并重新安装了所有宝石。但每次 sqlite 出现在我的“捆绑安装”日志中时:

.......
Using sqlite3 (1.3.4) 
Using sqlite3-ruby (1.3.3) 
Using taps (0.3.23) 
Using thin (1.2.11) 
Using turn (0.8.2) 
Using uglifier (1.0.3) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

My Gemfile:

source 'http://rubygems.org'

gem 'rails', '3.1.0'

gem "jquery-rails"
gem 'sorcery'
gem 'simple_form'
gem 'cocoon'

gem 'thin'
gem 'heroku'
gem 'taps'
gem 'pg'

# 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

group :development do
  gem "cucumber-rails"
  gem "capybara"
  gem "rspec-rails", ">= 2.0.1"
end

group :test do
  gem 'turn', :require => false
  gem "cucumber-rails"
  gem "capybara"
  gem "rspec-rails", ">= 2.0.1"
  gem "database_cleaner"
  gem "factory_girl_rails"
end

Help pls, What'sError?


更新: 添加了 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)
    addressable (2.2.6)
    ansi (1.3.0)
    arel (2.2.1)
    bcrypt-ruby (3.0.1)
    builder (3.0.0)
    capybara (1.1.1)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      selenium-webdriver (~> 2.0)
      xpath (~> 0.1.4)
    childprocess (0.2.2)
      ffi (~> 1.0.6)
    cocoon (1.0.12)
    coffee-rails (3.1.1)
      coffee-script (>= 2.2.0)
      railties (~> 3.1.0)
    coffee-script (2.2.0)
      coffee-script-source
      execjs
    coffee-script-source (1.1.2)
    cucumber (1.0.6)
      builder (>= 2.1.2)
      diff-lcs (>= 1.1.2)
      gherkin (~> 2.4.18)
      json (>= 1.4.6)
      term-ansicolor (>= 1.0.6)
    cucumber-rails (1.0.5)
      capybara (>= 1.1.1)
      cucumber (~> 1.0.6)
      nokogiri (>= 1.5.0)
    daemons (1.1.4)
    database_cleaner (0.6.7)
    diff-lcs (1.1.3)
    erubis (2.7.0)
    eventmachine (0.12.10)
    execjs (1.2.8)
      multi_json (~> 1.0)
    factory_girl (2.1.2)
      activesupport
    factory_girl_rails (1.2.0)
      factory_girl (~> 2.1.0)
      railties (>= 3.0.0)
    faraday (0.6.1)
      addressable (~> 2.2.4)
      multipart-post (~> 1.1.0)
      rack (< 2, >= 1.1.0)
    ffi (1.0.9)
    gherkin (2.4.21)
      json (>= 1.4.6)
    heroku (2.8.4)
      launchy (>= 0.3.2)
      rest-client (~> 1.6.1)
      rubyzip
      term-ansicolor (~> 1.0.5)
    hike (1.2.1)
    i18n (0.6.0)
    jquery-rails (1.0.14)
      railties (~> 3.0)
      thor (~> 0.14)
    json (1.6.1)
    json_pure (1.6.1)
    launchy (2.0.5)
      addressable (~> 2.2.6)
    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)
    multipart-post (1.1.3)
    nokogiri (1.5.0)
    oauth (0.4.5)
    oauth2 (0.4.1)
      faraday (~> 0.6.1)
      multi_json (>= 0.0.5)
    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)
    rest-client (1.6.7)
      mime-types (>= 1.16)
    rspec (2.6.0)
      rspec-core (~> 2.6.0)
      rspec-expectations (~> 2.6.0)
      rspec-mocks (~> 2.6.0)
    rspec-core (2.6.4)
    rspec-expectations (2.6.0)
      diff-lcs (~> 1.1.2)
    rspec-mocks (2.6.0)
    rspec-rails (2.6.1)
      actionpack (~> 3.0)
      activesupport (~> 3.0)
      railties (~> 3.0)
      rspec (~> 2.6.0)
    rubyzip (0.9.4)
    sass (3.1.7)
    sass-rails (3.1.2)
      actionpack (~> 3.1.0)
      railties (~> 3.1.0)
      sass (>= 3.1.4)
      sprockets (~> 2.0.0)
      tilt (~> 1.3.2)
    selenium-webdriver (2.7.0)
      childprocess (>= 0.2.1)
      ffi (>= 1.0.7)
      json_pure
      rubyzip
    sequel (3.20.0)
    simple_form (1.5.2)
      actionpack (~> 3.0)
      activemodel (~> 3.0)
    sinatra (1.0)
      rack (>= 1.0)
    sorcery (0.6.1)
      bcrypt-ruby (~> 3.0.0)
      oauth (~> 0.4.4)
      oauth (~> 0.4.4)
      oauth2 (~> 0.4.1)
      oauth2 (~> 0.4.1)
    sprockets (2.0.0)
      hike (~> 1.2)
      rack (~> 1.0)
      tilt (!= 1.3.0, ~> 1.1)
    sqlite3 (1.3.4)
    sqlite3-ruby (1.3.3)
      sqlite3 (>= 1.3.3)
    taps (0.3.23)
      rack (>= 1.0.1)
      rest-client (< 1.7.0, >= 1.4.0)
      sequel (~> 3.20.0)
      sinatra (~> 1.0.0)
      sqlite3-ruby (~> 1.2)
    term-ansicolor (1.0.6)
    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)
    turn (0.8.2)
      ansi (>= 1.2.2)
    tzinfo (0.3.29)
    uglifier (1.0.3)
      execjs (>= 0.3.0)
      multi_json (>= 1.0.2)
    xpath (0.1.4)
      nokogiri (~> 1.3)

PLATFORMS
  ruby

DEPENDENCIES
  capybara
  cocoon
  coffee-rails (~> 3.1.0)
  cucumber-rails
  database_cleaner
  factory_girl_rails
  heroku
  jquery-rails
  pg
  rails (= 3.1.0)
  rspec-rails (>= 2.0.1)
  sass-rails (~> 3.1.0)
  simple_form
  sorcery
  taps
  thin
  turn
  uglifier

Bundler keeps install sqlite3 every time, but i'm not using it in my project. I've chosen Postgres, but can not deploy it to Heroku. Bundler is the reason for that. Why it is? And what should i do?

I was trying to make separate gemset for that. I cleared and reinstalled all gems. But every time sqlite comes to my "bundle install" log:

.......
Using sqlite3 (1.3.4) 
Using sqlite3-ruby (1.3.3) 
Using taps (0.3.23) 
Using thin (1.2.11) 
Using turn (0.8.2) 
Using uglifier (1.0.3) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

My Gemfile:

source 'http://rubygems.org'

gem 'rails', '3.1.0'

gem "jquery-rails"
gem 'sorcery'
gem 'simple_form'
gem 'cocoon'

gem 'thin'
gem 'heroku'
gem 'taps'
gem 'pg'

# 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

group :development do
  gem "cucumber-rails"
  gem "capybara"
  gem "rspec-rails", ">= 2.0.1"
end

group :test do
  gem 'turn', :require => false
  gem "cucumber-rails"
  gem "capybara"
  gem "rspec-rails", ">= 2.0.1"
  gem "database_cleaner"
  gem "factory_girl_rails"
end

Help pls, what's wrong?


UPDATE:
Added 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)
    addressable (2.2.6)
    ansi (1.3.0)
    arel (2.2.1)
    bcrypt-ruby (3.0.1)
    builder (3.0.0)
    capybara (1.1.1)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      selenium-webdriver (~> 2.0)
      xpath (~> 0.1.4)
    childprocess (0.2.2)
      ffi (~> 1.0.6)
    cocoon (1.0.12)
    coffee-rails (3.1.1)
      coffee-script (>= 2.2.0)
      railties (~> 3.1.0)
    coffee-script (2.2.0)
      coffee-script-source
      execjs
    coffee-script-source (1.1.2)
    cucumber (1.0.6)
      builder (>= 2.1.2)
      diff-lcs (>= 1.1.2)
      gherkin (~> 2.4.18)
      json (>= 1.4.6)
      term-ansicolor (>= 1.0.6)
    cucumber-rails (1.0.5)
      capybara (>= 1.1.1)
      cucumber (~> 1.0.6)
      nokogiri (>= 1.5.0)
    daemons (1.1.4)
    database_cleaner (0.6.7)
    diff-lcs (1.1.3)
    erubis (2.7.0)
    eventmachine (0.12.10)
    execjs (1.2.8)
      multi_json (~> 1.0)
    factory_girl (2.1.2)
      activesupport
    factory_girl_rails (1.2.0)
      factory_girl (~> 2.1.0)
      railties (>= 3.0.0)
    faraday (0.6.1)
      addressable (~> 2.2.4)
      multipart-post (~> 1.1.0)
      rack (< 2, >= 1.1.0)
    ffi (1.0.9)
    gherkin (2.4.21)
      json (>= 1.4.6)
    heroku (2.8.4)
      launchy (>= 0.3.2)
      rest-client (~> 1.6.1)
      rubyzip
      term-ansicolor (~> 1.0.5)
    hike (1.2.1)
    i18n (0.6.0)
    jquery-rails (1.0.14)
      railties (~> 3.0)
      thor (~> 0.14)
    json (1.6.1)
    json_pure (1.6.1)
    launchy (2.0.5)
      addressable (~> 2.2.6)
    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)
    multipart-post (1.1.3)
    nokogiri (1.5.0)
    oauth (0.4.5)
    oauth2 (0.4.1)
      faraday (~> 0.6.1)
      multi_json (>= 0.0.5)
    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)
    rest-client (1.6.7)
      mime-types (>= 1.16)
    rspec (2.6.0)
      rspec-core (~> 2.6.0)
      rspec-expectations (~> 2.6.0)
      rspec-mocks (~> 2.6.0)
    rspec-core (2.6.4)
    rspec-expectations (2.6.0)
      diff-lcs (~> 1.1.2)
    rspec-mocks (2.6.0)
    rspec-rails (2.6.1)
      actionpack (~> 3.0)
      activesupport (~> 3.0)
      railties (~> 3.0)
      rspec (~> 2.6.0)
    rubyzip (0.9.4)
    sass (3.1.7)
    sass-rails (3.1.2)
      actionpack (~> 3.1.0)
      railties (~> 3.1.0)
      sass (>= 3.1.4)
      sprockets (~> 2.0.0)
      tilt (~> 1.3.2)
    selenium-webdriver (2.7.0)
      childprocess (>= 0.2.1)
      ffi (>= 1.0.7)
      json_pure
      rubyzip
    sequel (3.20.0)
    simple_form (1.5.2)
      actionpack (~> 3.0)
      activemodel (~> 3.0)
    sinatra (1.0)
      rack (>= 1.0)
    sorcery (0.6.1)
      bcrypt-ruby (~> 3.0.0)
      oauth (~> 0.4.4)
      oauth (~> 0.4.4)
      oauth2 (~> 0.4.1)
      oauth2 (~> 0.4.1)
    sprockets (2.0.0)
      hike (~> 1.2)
      rack (~> 1.0)
      tilt (!= 1.3.0, ~> 1.1)
    sqlite3 (1.3.4)
    sqlite3-ruby (1.3.3)
      sqlite3 (>= 1.3.3)
    taps (0.3.23)
      rack (>= 1.0.1)
      rest-client (< 1.7.0, >= 1.4.0)
      sequel (~> 3.20.0)
      sinatra (~> 1.0.0)
      sqlite3-ruby (~> 1.2)
    term-ansicolor (1.0.6)
    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)
    turn (0.8.2)
      ansi (>= 1.2.2)
    tzinfo (0.3.29)
    uglifier (1.0.3)
      execjs (>= 0.3.0)
      multi_json (>= 1.0.2)
    xpath (0.1.4)
      nokogiri (~> 1.3)

PLATFORMS
  ruby

DEPENDENCIES
  capybara
  cocoon
  coffee-rails (~> 3.1.0)
  cucumber-rails
  database_cleaner
  factory_girl_rails
  heroku
  jquery-rails
  pg
  rails (= 3.1.0)
  rspec-rails (>= 2.0.1)
  sass-rails (~> 3.1.0)
  simple_form
  sorcery
  taps
  thin
  turn
  uglifier

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

习ぎ惯性依靠 2024-12-13 17:02:19

(即使你已经弄清楚了,我还是会把它放在这里,以防人们出于某种原因不阅读评论)

你已经知道的“taps”gem(http://rubygems.org/gems/taps) Gemfile 中所需的内容对“sqlite3-ruby”gem 具有运行依赖性。

您通常可以通过查看 Gemfile.lock 文件来找出奇怪的依赖项来自哪里,正如您在此处看到的那样...

taps (0.3.23)
  rack (>= 1.0.1)
  rest-client (< 1.7.0, >= 1.4.0)
  sequel (~> 3.20.0)
  sinatra (~> 1.0.0)
  sqlite3-ruby (~> 1.2)

每个 gem 都会列出其运行时依赖项以及它所需的版本。

(Even though you've figured it out, i'll put it here incase for some reason people don't read the comments)

The 'taps' gem (http://rubygems.org/gems/taps) that you've required in your Gemfile has a runtine dependancy on the 'sqlite3-ruby' gem.

You can ususally find out where strange dependencies come from by looking in your Gemfile.lock file, as you can see here...

taps (0.3.23)
  rack (>= 1.0.1)
  rest-client (< 1.7.0, >= 1.4.0)
  sequel (~> 3.20.0)
  sinatra (~> 1.0.0)
  sqlite3-ruby (~> 1.2)

Each gem will be listed with its runtime dependencies along with the version that it needs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文