使用Bundler和Heroku的宝石的基本工作流程是什么?

时间:2013-09-04 13:44:22

标签: ruby git heroku gem bundler

我在app目录的根目录中有一个Gemfile,我在其中指定带有versionnumber的gems,如下所示:

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上遇到错误(在更新了所有宝石之后),说明以下内容

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)

0 个答案:

没有答案