【问题标题】:Webistrano - Phusion Passenger - Could not find rakeWebistrano - Phusion 乘客 - 找不到 rake
【发布时间】:2012-08-23 09:23:26
【问题描述】:

我在 Webistrano 中运行部署任务时遇到问题。 仅当我使用 Phusion Passenger 从 Nginx 运行 Webistrano 时。

当我使用以下命令运行 Webistano 时,一切正常。

ruby 脚本/服务器 -d -p 3000 -e 生产

但是当从 Phusion Passenger 运行它(使用“passenger-install-nginx-module”编译)并且我想做一个部署(应用程序正在运行)时,我的日志中出现以下错误:

/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/spec_set.rb:90:in `materialize': Could not find rake-0.9.2.2 in any of the sources (Bundler::GemNotFound)
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `map!'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `materialize'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:127:in `specs'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:172:in `specs_for'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:161:in `requested_specs'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/environment.rb:23:in `requested_specs'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runtime.rb:11:in `setup'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler.rb:107:in `setup'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/setup.rb:17

我的捆绑宝石列表:

  Gems included by the bundle:
  * actionmailer (2.3.11)
  * actionpack (2.3.11)
  * activerecord (2.3.11)
  * activeresource (2.3.11)
  * activesupport (2.3.11)
  * bundler (1.1.5)
  * capistrano (2.6.0)
  * erubis (2.7.0)
  * exception_notification (2.3.3.0)
  * highline (1.6.13)
  * mocha (0.9.8)
  * mysql (2.8.1)
  * net-scp (1.0.4)
  * net-sftp (2.0.5)
  * net-ssh (2.5.2)
  * net-ssh-gateway (1.1.0)
  * open4 (0.9.3)
  * rack (1.1.3)
  * rails (2.3.11)
  * rake (0.9.2.2)
  * syntax (1.0.0)

这是在我的 nginx.conf 中:

passenger_root /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.15;
passenger_ruby /usr/local/bin/ruby;

以及我的特定服务器配置:

passenger_enabled on;
rails_env production;

奇怪的是,使用 WeBrick 运行它只是正常工作,但通过 nginx 的乘客却不是。 我不是很喜欢 Ruby,我真的不知道我应该从哪里开始寻找。

我从源代码安装 ruby​​,没有 rvm。

提前致谢!

编辑:

错误来自这一行:

ruby 脚本/运行器 -e 生产 ' 部署 = Deployment.find(1085); Webistrano::Deployer.new(deployment).invoke_task! '

从命令行执行时按方面工作,但通过 nginx/passenger 从应用程序内执行时不工作。

【问题讨论】:

    标签: ruby nginx passenger webistrano


    【解决方案1】:

    可能有点晚了,但我猜该错误与运行它的用户有关。乘客在 Apache 用户下运行。 Webistrano wiki 上讨论了一个与 git 类似的问题。

    https://github.com/peritor/webistrano/wiki/Installing-with-Phusion-Passenger

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-12-31
      • 2012-11-07
      • 2012-05-12
      • 2011-12-09
      • 2012-04-27
      • 1970-01-01
      • 1970-01-01
      • 2011-04-13
      相关资源
      最近更新 更多