nginx の背後にあるシン 1.2.11 でアプリケーションを実行しています。開発マシンで使用bundle update
し、git にコミットしてからcap deploy
. ただし、薄いと次のエラーが発生します。
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.14/lib/bundler/runtime.rb:31:in `block in setup': You have already activated rack 1.3.0, but your Gemfile requires rack 1.2.3. Consider using bundle exec. (Gem::LoadError)
サーバーには、システム全体に次の宝石がインストールされています。
bundler (1.0.14)
daemons (1.1.3)
eventmachine (0.12.10)
rack (1.3.0)
rake (0.9.2)
thin (1.2.11)
私のアプリケーションのGemfile:
source 'http://rubygems.org'
gem 'rails', '3.0.7'
gem 'sqlite3'
gem 'capistrano'
gem 'thin'
gem 'RedCloth'
gem 'will_paginate', '3.0.pre2'
gem 'jquery-rails'
シンにはラック 1.3 が必要ですが、Gemfile にはラック 1.2.3 が必要です。ジェムの管理方法が間違っていませんか? デプロイと適切な gem コントロールを管理する適切な方法は何ですか?
の使用が機能することがわかりましbundle exec thin start
たが、使用できるようにするソリューションを好みます/etc/init.d/thin start
。