我有一个在 nginx 后面的瘦 1.2.11 上运行的应用程序。我试图将我的应用程序更新到它bundle update
在开发机器上使用的最新版本的 gem,提交到 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)
在服务器上,我在系统范围内安装了以下 gem:
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 控制的正确方法是什么?
我发现 usingbundle exec thin start
有效,但我更喜欢允许我使用/etc/init.d/thin start
.