Autorun the Faye server when I start the Rails server

前端 未结 4 711
生来不讨喜
生来不讨喜 2020-12-24 03:25

I currently have Faye working with my Rails 3.0.9 application. However I have two separate tabs open in my terminal. One for the Faye server, and one for the Rails server. H

4条回答
  •  悲哀的现实
    2020-12-24 03:45

    Simply create an initializer containing:

    Thread.new do
      system("rackup faye.ru -s thin -E production")
    end
    

    Better option:

    Use https://github.com/FooBarWidget/daemon_controller

提交回复
热议问题