【问题标题】:How to specify thin to use Rack adapter rather than Rails adapter when starting启动时如何指定瘦以使用 Rack 适配器而不是 Rails 适配器
【发布时间】:2011-01-23 20:52:45
【问题描述】:

我正在使用 Capistrano 部署应用程序。如果我通过 SSH 在终端输入以下命令,则以下命令有效:
瘦启动 -p 20480 -e 生产 -d

但是当它通过 Capfile 运行时:
运行“cd #{current_path} && thin start -p 20480 -e production -d”

日志中有这个错误:

将 PID 写入 tmp/pids/thin.pid
使用 rails 适配器
退出!
/usr/local/rvm/rubies/ruby-1.8.6-p369/lib/ruby/1.8/yaml.rb:133:in load': syntax error on line 2, col 8: specs:' (ArgumentError)

区别在于第二条:使用 rails 适配器。当我自己在终端输入这个命令时,它说Using Rack adapter.

知道如何解决这个问题吗? 非常感谢您的任何建议。

最好的问候, 托尼。

【问题讨论】:

    标签: ruby-on-rails capistrano thin


    【解决方案1】:

    尝试明确说明您要使用的适配器。您可以使用 --adapter 开关执行此操作。所以你的代码行将如下所示:

    run "cd #{current_path} && thin start -p 20480 -e production -d --adapter rack"
    

    也许这会有所帮助。


    PS。

    瘦 --help 说:

    -A, --adapter NAME   Rack adapter to use (default: autodetect)
                         (rack, rails, ramaze, halcyon, merb, 
                          mack, mack, file)
    

    【讨论】:

      猜你喜欢
      • 2011-01-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多