unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* Re: Sysadmin Setup question for Unicorn
  2009-11-03 12:19  7% Sysadmin Setup question for Unicorn huet bartels
@ 2009-11-03 17:07  0% ` Eric Wong
  2009-11-03 17:13  0% ` Chris Wanstrath
  1 sibling, 0 replies; 4+ results
From: Eric Wong @ 2009-11-03 17:07 UTC (permalink / raw)
  To: unicorn list

huet bartels <hbartels@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?

Hi Huet,

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@install01:/app/unicorn/config$ unicorn_rails -c config.ru 
> I, [2009-11-03T13:05:47.609036 #30824]  INFO -- : unlinking existing
> socket=/app/unicorn/tmp/sockets/unicorn.sock
> 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
argument:

   unicorn production.ru

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
Unicorn.

> 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

-- 
Eric Wong

^ permalink raw reply	[relevance 0%]

* Re: Sysadmin Setup question for Unicorn
  2009-11-03 12:19  7% Sysadmin Setup question for Unicorn huet bartels
  2009-11-03 17:07  0% ` Eric Wong
@ 2009-11-03 17:13  0% ` Chris Wanstrath
  1 sibling, 0 replies; 4+ results
From: Chris Wanstrath @ 2009-11-03 17:13 UTC (permalink / raw)
  To: unicorn list

On Tue, Nov 3, 2009 at 4:19 AM, huet bartels <hbartels@i-neda.com> wrote:

> 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. unicorn_rails must be run from RAILS_ROOT.

See http://unicorn.bogomips.org/unicorn_rails_1.html

> The other error i get is when I run unicorn with the command line.
>
> unicorn@install01:/app/unicorn/config$ unicorn -c config.ru
> {:daemonize=>false,
>  :unicorn_options=>
>  {:listeners=>[], :config_file=>"/app/unicorn/config/config.ru"},
>  :app=>
>
> #<Proc:0xb7bf2a68@/app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/unicorn-0.93.4/bin/unicorn:123>}
> I, [2009-11-03T13:03:53.555204 #30820]  INFO -- : unlinking existing
> socket=/app/unicorn/tmp/sockets/unicorn.sock
> I, [2009-11-03T13:03:53.555538 #30820]  INFO -- : listening on
> addr=/app/unicorn/tmp/sockets/unicorn.sock fd=3
> 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)
>
> from /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval'
>
> from /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize'
>        from config.ru:1:in `new'
>        from config.ru:1
>
> from /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/unicorn-0.93.4/lib/unicorn.rb:697:in `eval'
>
> from /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/unicorn-0.93.4/bin/unicorn:130
>
> from /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/unicorn-0.93.4/lib/unicorn.rb:697:in `call'
>
> from /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/unicorn-0.93.4/lib/unicorn.rb:697:in `build_app!'
>
> from /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/unicorn-0.93.4/lib/unicorn.rb:170:in `start'
>
> from /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/unicorn-0.93.4/lib/unicorn.rb:20:in `run'
>
> from /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/unicorn-0.93.4/bin/unicorn:165
>        from /app/ruby/bin/unicorn:19:in `load'
>        from /app/ruby/bin/unicorn:19
> unicorn@install01:/app/unicorn/config$
>
> Now is this error generanted because it requires a rails envoiroment.

You need a separate unicorn.rb, distinct from your config.ru when
using Unicorn. It appears you are using the proper config option
(worker_processes) but putting it in the wrong file (config.ru).

config.ru defines your app. Unicorn runs your app. The two are
interchangeable, and this is a good thing.

Trying moving your unicorn specific logic into a unicorn.rb and
launching it with `unicorn -c unicorn.rb config.ru`

-- 
Chris Wanstrath
http://github.com/defunkt

^ permalink raw reply	[relevance 0%]

* Sysadmin Setup question for Unicorn
@ 2009-11-03 12:19  7% huet bartels
  2009-11-03 17:07  0% ` Eric Wong
  2009-11-03 17:13  0% ` Chris Wanstrath
  0 siblings, 2 replies; 4+ results
From: huet bartels @ 2009-11-03 12:19 UTC (permalink / raw)
  To: mongrel-unicorn

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?

unicorn@install01:/app/unicorn/config$ unicorn_rails -c config.ru 
I, [2009-11-03T13:05:47.609036 #30824]  INFO -- : unlinking existing
socket=/app/unicorn/tmp/sockets/unicorn.sock
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>



The other error i get is when I run unicorn with the command line.

unicorn@install01:/app/unicorn/config$ unicorn -c config.ru
{:daemonize=>false,
 :unicorn_options=>
  {:listeners=>[], :config_file=>"/app/unicorn/config/config.ru"},
 :app=>

#<Proc:0xb7bf2a68@/app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/unicorn-0.93.4/bin/unicorn:123>}
I, [2009-11-03T13:03:53.555204 #30820]  INFO -- : unlinking existing
socket=/app/unicorn/tmp/sockets/unicorn.sock
I, [2009-11-03T13:03:53.555538 #30820]  INFO -- : listening on
addr=/app/unicorn/tmp/sockets/unicorn.sock fd=3
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)

from /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval'

from /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize'
	from config.ru:1:in `new'
	from config.ru:1

from /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/unicorn-0.93.4/lib/unicorn.rb:697:in `eval'

from /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/unicorn-0.93.4/bin/unicorn:130

from /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/unicorn-0.93.4/lib/unicorn.rb:697:in `call'

from /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/unicorn-0.93.4/lib/unicorn.rb:697:in `build_app!'

from /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/unicorn-0.93.4/lib/unicorn.rb:170:in `start'

from /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/unicorn-0.93.4/lib/unicorn.rb:20:in `run'

from /app/ruby.1.8.7-p174/lib/ruby/gems/1.8/gems/unicorn-0.93.4/bin/unicorn:165
	from /app/ruby/bin/unicorn:19:in `load'
	from /app/ruby/bin/unicorn:19
unicorn@install01:/app/unicorn/config$ 

Now is this error generanted because it requires a rails envoiroment.

I am happy to be pointed to a website that will help me learn what is
required if such a thing exists.

thank you for your time

regards

Huet Bartels

^ permalink raw reply	[relevance 7%]

* [ANN] unicorn 0.93.4 - *BSD stdio compatibility
@ 2009-10-27  8:56  4% Eric Wong
  0 siblings, 0 replies; 4+ results
From: Eric Wong @ 2009-10-27  8:56 UTC (permalink / raw)
  To: mongrel-unicorn

Unicorn is a HTTP server for Rack applications designed to only serve
fast clients on low-latency, high-bandwidth connections and take
advantage of features in Unix/Unix-like kernels.  Slow clients should
only be served by placing a reverse proxy capable of fully buffering
both the the request and response in between Unicorn and slow clients.

* http://unicorn.bogomips.org/
* mongrel-unicorn@rubyforge.org
* git://git.bogomips.org/unicorn.git

Changes:

This release mainly works around BSD stdio compatibility issues
that affect at least FreeBSD and OS X.  While this issues was
documented and fixed in [ruby-core:26300][1], no production
release of MRI 1.8 has it, and users typically upgrade MRI more
slowly than gems.  This issue does NOT affect 1.9 users.  Thanks
to Vadim Spivak for reporting and testing this issue and Andrey
Stikheev for the fix.

Additionally there are small documentation bits, one error
handling improvement, and one minor change that should improve
reliability of signal delivery.

Andrey Stikheev (1):
      workaround FreeBSD/OSX IO bug for large uploads

Eric Wong (7):
      DESIGN: address concerns about on-demand and thundering herd
      README: alter reply conventions for the mailing list
      configurator: stop testing for non-portable listens
      KNOWN_ISSUES: document Rack gem issue w/Rails 2.3.2
      stop continually resends signals during shutdowns
      add news bodies to site NEWS.atom.xml
      configurator: fix broken example in RDoc

Suraj N. Kurapati (1):
      show configuration file path in errors instead of '(eval)'

[1] http://redmine.ruby-lang.org/issues/show/2267
-- 
Eric Wong

^ permalink raw reply	[relevance 4%]

Results 1-4 of 4 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2009-10-27  8:56  4% [ANN] unicorn 0.93.4 - *BSD stdio compatibility Eric Wong
2009-11-03 12:19  7% Sysadmin Setup question for Unicorn huet bartels
2009-11-03 17:07  0% ` Eric Wong
2009-11-03 17:13  0% ` Chris Wanstrath

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).