代码之家  ›  专栏  ›  技术社区  ›  shingara

如何用Rails3定义自己的服务器

  •  7
  • shingara  · 技术社区  · 14 年前

    我希望在开发模式下启动rails服务器时使用always thin。

    gem 'thin', :group => 'development'
    

    现在如果我想用它在开发模式下启动服务器,我必须定义它。

    bundle exec rails s thin
    

    如果我不给它下定义,它总是用webrick。那么如何定义默认情况下使用thin呢?

    2 回复  |  直到 14 年前
        1
  •  7
  •   Trip    14 年前

    rails s 只需键入:

    >> thin start -p 3000
    

    也可以指定环境:

    >> thin start -e production
    
        2
  •  0
  •   Joshua Partogi    14 年前

    假设您使用的是bundler 1.0.x,并且您的gems是供应商化的:

    bundle exec vendor/ruby/1.9.1/bin/thin start