當我嘗試將我的應用程序部署到Bluemix時,出現以下錯誤。我的manifest.yml
文件如下。IBM_DB Gem問題
applications:
- path: .
memory: 512M
instances: 1
domain: mybluemix.net
name: KnowYourBrand
host: kyb
command: bundle exec rake db:setup && bundle exec rails s -p $PORT
disk_quota: 1024M
services:
- Personality Insights-n2
- Tone Analyzer-uu
- Insights for Twitter-bt
- kybSQLDB
- AlchemyAPI-tw
buildpack: https://github.com/ibmdb/db2rubybuildpack
2015-11-17T13:04:51.55-0600 [App/0] ERR LoadError: libdb2.so.1: cannot open shared object file: No such file or directory - /home/vcap/app/vendor/bundle/ru by/2.2.0/extensions/x86_64-linux/ 2.2.0-static/ibm_db-2.6.1/ibm_db.so
我的Gemfile如下:
source 'http://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.8'
gem 'backbone-on-rails'
gem 'whenever', :require => false
group :production do
gem 'ibm_db'
gem 'rails_12factor'
end
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-script-source', '1.8.0'
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Use ActiveModel has_secure_password
gem 'bcrypt-ruby', '>= 3.1.2', :platform => :ruby
gem 'httparty'
gem 'figaro'
gem "cf-autoconfig", "~> 0.2.1"
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development do
gem 'byebug'
gem 'annotate'
gem 'better_errors'
gem 'binding_of_caller'
gem 'pry-rails'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
end
# Use debugger
# gem 'debugger', group: [:development, :test]
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin]
還有什麼問題呢?我試着將ibm_db
版本設置爲較舊的版本,但這也未能解決問題。
Environment variable IBM_DB_HOME is not set. Set it to your DB2/IBM_Data_Server_ Driver installation directory and retry gem install.
無需在我的本地計算機上安裝驅動程序即可處理此問題的最佳方法是什麼?我只是試圖將其部署到Bluemix。
?你的問題說mySQLDB,但你有其他地方列出的IBM DB2 ... –
也可以請你的manifest.yml文件和gemfiles添加到你的問題? –
嗨亞歷克斯 - 我已附上上述。我試圖擺脫ibm_db寶石和紅寶石buildpack,並會看到如何擺脫。 –