我试图让我的Ubuntu服务器Karmic框中的准备设置Capistrano的杂种群集。 我一直试图让这两个人整天工作,最后决定彻底删除Capistrano,看看我能不能让Mongrel Cluster工作。
我跑这个安装杂种群:
gem install mongrel mongrel_cluster
一切安装好,当我改变到我的应用程序的目录…
# mongrel_rails -bash: mongrel_rails: command not found
我可以从安装位置运行它:
# /var/lib/gems/1.8/bin/mongrel_rails Usage: mongrel_rails <command> [options] Available commands are: ...
它使我可以很好地构build群集configuration文件,但是当我运行clister:start命令时:
# /var/lib/gems/1.8/bin/mongrel_rails cluster::start starting port 8000 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31: command not found: mongrel_rails start -d -e production -p 8000 -P tmp/pids/mongrel.8000.pid -l log/mongrel.8000.log starting port 8001 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31: command not found: mongrel_rails start -d -e production -p 8001 -P tmp/pids/mongrel.8001.pid -l log/mongrel.8001.log starting port 8002 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31: command not found: mongrel_rails start -d -e production -p 8002 -P tmp/pids/mongrel.8002.pid -l log/mongrel.8002.log
看来这不是从命令后面的正确目录调用它,我能做些什么来解决这个问题? 我试图在设置Capistrano时尝试设置path,但当Capistrano使用ssh来运行命令时,path没有保持设置。
请尝试这个符号链接:
ln -s /var/lib/gems/1.8/bin/mongrel_rails /usr/lib/ruby/1.8/rubygems/mongrel_rails