0

我在应用程序目录的根目录中有一个 Gemfile,我在其中指定带有版本号的 gem,如下所示:

gem 'rails', '3.2.14'

或在这样的环境块(如果适用)中:

group :production do
  gem 'pg', '0.12.2'
end

当我添加一个新的 gem 时,我运行命令

bundle install

当我想更新所有宝石时,我运行命令

bundle update

当我将我的应用程序部署到 Heroku 时,我运行

git push heroku master

我在工作流程中缺少什么,或者可以改进吗?因为现在我在 Heroku 上遇到错误(在更新了所有 gem 之后),说明如下

can't activate bcrypt-ruby (~> 3.0.0, runtime), already activated bcrypt-ruby-3.1.2. Make sure all dependencies are added to Gemfile. (Gem::LoadError)

而且我无法弄清楚我做错了什么。该应用程序在本地运行良好。非常感谢澄清我正在做的逻辑错误。

更新

Gemfile.lock:

GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (3.2.14)
      actionpack (= 3.2.14)
      mail (~> 2.5.4)
    actionpack (3.2.14)
      activemodel (= 3.2.14)
      activesupport (= 3.2.14)
      builder (~> 3.0.0)
      erubis (~> 2.7.0)
      journey (~> 1.0.4)
      rack (~> 1.4.5)
      rack-cache (~> 1.2)
      rack-test (~> 0.6.1)
      sprockets (~> 2.2.1)
    activemodel (3.2.14)
      activesupport (= 3.2.14)
      builder (~> 3.0.0)
    activerecord (3.2.14)
      activemodel (= 3.2.14)
      activesupport (= 3.2.14)
      arel (~> 3.0.2)
      tzinfo (~> 0.3.29)
    activeresource (3.2.14)
      activemodel (= 3.2.14)
      activesupport (= 3.2.14)
    activesupport (3.2.14)
      i18n (~> 0.6, >= 0.6.4)
      multi_json (~> 1.0)
    arel (3.0.2)
    bcrypt-ruby (3.1.2)
    builder (3.0.4)
    daemons (1.1.9)
    erubis (2.7.0)
    eventmachine (1.0.3)
    execjs (2.0.1)
    hike (1.2.3)
    hirb (0.7.1)
    httpclient (2.3.4.1)
    i18n (0.6.5)
    impressionist (1.4.7)
      httpclient (~> 2.2)
      nokogiri (~> 1.6.0)
    journey (1.0.4)
    jquery-rails (2.2.1)
      railties (>= 3.0, < 5.0)
      thor (>= 0.14, < 2.0)
    jquery-ui-rails (4.0.4)
      jquery-rails
      railties (>= 3.1.0)
    json (1.8.0)
    mail (2.5.4)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.25)
    mini_portile (0.5.1)
    multi_json (1.7.9)
    nokogiri (1.6.0)
      mini_portile (~> 0.5.0)
    pg (0.12.2)
    polyglot (0.3.3)
    quiet_assets (1.0.2)
      railties (>= 3.1, < 5.0)
    rack (1.4.5)
    rack-cache (1.2)
      rack (>= 0.4)
    rack-ssl (1.3.3)
      rack
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (3.2.14)
      actionmailer (= 3.2.14)
      actionpack (= 3.2.14)
      activerecord (= 3.2.14)
      activeresource (= 3.2.14)
      activesupport (= 3.2.14)
      bundler (~> 1.0)
      railties (= 3.2.14)
    railties (3.2.14)
      actionpack (= 3.2.14)
      activesupport (= 3.2.14)
      rack-ssl (~> 1.3.2)
      rake (>= 0.8.7)
      rdoc (~> 3.4)
      thor (>= 0.14.6, < 2.0)
    rake (10.1.0)
    rdoc (3.12.2)
      json (~> 1.4)
    sass (3.2.10)
    sass-rails (3.2.6)
      railties (~> 3.2.0)
      sass (>= 3.1.10)
      tilt (~> 1.3)
    sprockets (2.2.2)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    sqlite3 (1.3.7)
    thin (1.5.1)
      daemons (>= 1.0.9)
      eventmachine (>= 0.12.6)
      rack (>= 1.0.0)
    thor (0.18.1)
    tilt (1.4.1)
    treetop (1.4.15)
      polyglot
      polyglot (>= 0.3.1)
    tzinfo (0.3.37)
    uglifier (2.2.1)
      execjs (>= 0.3.0)
      multi_json (~> 1.0, >= 1.0.2)
    webrick (1.3.1)

PLATFORMS
  ruby

DEPENDENCIES
  bcrypt-ruby (= 3.1.2)
  hirb
  impressionist
  jquery-rails (= 2.2.1)
  jquery-ui-rails
  pg (= 0.12.2)
  quiet_assets
  rails (= 3.2.14)
  sass-rails (~> 3.2.6)
  sqlite3 (= 1.3.7)
  thin
  uglifier (>= 1.3.0)
  webrick (~> 1.3.1)
4

0 回答 0