我用 Gemfile 中的新 gem 重新部署我的 heroku 应用程序,它在启动时崩溃
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require': libruby.so.1.9: cannot open shared object file: No such file or directory - /app/vendor/bundle/ruby/1.9.1/gems/bcrypt-ruby-3.0.1/lib/bcrypt_ext.so (LoadError)
无论我部署什么分支(旧的稳定分支......),都会发生这种情况,并且只能通过执行heroku rollback
.
我相信这是由 heroku 最近更新他们的 ruby 1.9.3 引起的,因为我遇到了这个问题Heroku app crash with 'libruby.so.1.9: cannot open shared object file'。移除 nokogiri 宝石停止了我得到的异常,但仍然有这个。添加新宝石时会发生更多类似的错误。
通过部署到一个新的 heroku 应用程序解决了整个问题,但这不是我可以在我的生产服务器上做的事情。
有关解决问题或以某种方式“刷新”我的应用程序的任何想法?
我的宝石文件:
source "https://rubygems.org"
ruby "1.9.3"
gem "rails", "3.2.3"
gem "thin"
# Bundle edge Rails instead:
# gem "rails", :git => "git://github.com/rails/rails.git"
gem "mongoid"
gem "devise"
gem "haml"
gem "sass"
gem "exceptional"
gem "kaminari"
gem "mongoid_search"
#gem "nokogiri"
gem "bson_ext"
gem "heroku-mongo-backup"
gem "aws-s3"
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem "haml-rails", "~> 0.3.4"
gem "sass-rails", "~> 3.2.3"
gem "coffee-rails", "~> 3.2.1"
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem "therubyracer", :platform => :ruby
gem "uglifier", ">= 1.0.3"
end
gem "jquery-rails"
group :test do
gem "mongoid-rspec"
end
# To use ActiveModel has_secure_password
# gem "bcrypt-ruby", "~> 3.0.0"
# To use Jbuilder templates for JSON
# gem "jbuilder"
# Use unicorn as the app server
# gem "unicorn"
# Deploy with Capistrano
# gem "capistrano"
# To use debugger
# gem "ruby-debug19", :require => "ruby-debug"
#
group :development do
gem "letter_opener"
end