by Lin Jen-Shin (godfat)
Unicorn family Rack handlers for you. Mostly for
- The web server you want to use (e.g. unicorn, yahns, rainbows, zbatery, etc)
gem install rack-handlers
rails s, put this into your Gemfile:
group :development do gem 'rack-handlers', :require => 'rack/handler/rails-server' end gem 'unicorn'
And don't forget your favourite unicorns, then you could do the following:
rails s # a sensible default rails s unicorn rails s yahns rails s rainbows rails s zbatery
'rack-handlers' would make
pick the server with the following order:
- torquebox (for jruby)
- trinidad (for jruby)
Thus if you have rainbows installed,
rails s would launch the server with
rainbows instead of webrick (the original behaviour).
Additionally, it would also try to load the config via
config/unicorn.rb depending on which server is picked.
For people who likes to run
What if my config file is not located in
Then you could use the newly added option
rails s -C config/twilight.rb rails s --CONFIG config/rarity.rb
So that it would overwrite the default config path.
- John Goulah (@jgoulah)
- Lin Jen-Shin (@godfat)
Apache License 2.0
Copyright (c) 2012-2016, Lin Jen-Shin (godfat)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.