Sysadmin Setup question for Unicorn
normalperson at yhbt.net
Tue Nov 3 12:07:35 EST 2009
huet bartels <hbartels at i-neda.com> wrote:
> Dear List,
> I am very new to ruby and this list.
> I am trying to setup unicorn to run on ubuntu 8.10. When I try to run
> unicorn I am getting the following error.
> with the following command I get the following error. Is this because I
> dont have a ruby rails app installed yet?
Yes, you need a Ruby on Rails app to run `unicorn_rails' and you should
be able to run any Rack application with `unicorn'.
> unicorn at install01:/app/unicorn/config$ unicorn_rails -c config.ru
> I, [2009-11-03T13:05:47.609036 #30824] INFO -- : unlinking existing
> I, [2009-11-03T13:05:47.609458 #30824] INFO -- : listening on
> addr=/app/unicorn/tmp/sockets/unicorn.sock fd=3
> I, [2009-11-03T13:05:47.609541 #30824] INFO -- : Refreshing Gem list
> /app/ruby/bin/unicorn_rails must be run inside RAILS_ROOT: #<LoadError:
> no such file to load -- config/boot>
Also, your config.ru is the rackup config file, not the Unicorn config
file which you would specify with the "-c" option. You only need a
config.ru if you're using a non-Rails Rack application (but you can
use one with Rails, too). You don't need to pass any switches for
the config.ru, either, if it's in ./config.ru it'll automatically
be detected and otherwise you can just pass it as the first non-option
Here, you're specifying Unicorn config directives in your config.ru:
> I, [2009-11-03T13:03:53.555596 #30820] INFO -- : Refreshing Gem list
> Exception `NoMethodError' at config.ru:6 - undefined method
> `worker_processes' for #<Rack::Builder:0xb7a107b8 @ins=>
> Exception `NoMethodError'
> at /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/unicorn-0.93.4/bin/unicorn:130 - undefined method `worker_processes' for #<Rack::Builder:0xb7a107b8 @ins=>
> config.ru:6: undefined method `worker_processes' for
> #<Rack::Builder:0xb7a107b8 @ins=> (NoMethodError)
config.ru is meant to be used with all Rack-able servers (Mongrel, Thin,
Passenger, Unicorn) whereas the Unicorn config file is only meant for
> I am happy to be pointed to a website that will help me learn what is
> required if such a thing exists.
http://rack.rubyforge.org/ has some good links on how to setup config.ru
More information about the mongrel-unicorn