Displaying 20 results from an estimated 1000 matches similar to: "Fwd: Issue starting unicorn with non-ActiveRecord Rails app"
2013 Mar 24
5
Rails 4.0 has_many_through and fields_for
Hi all, I am trying to reproduce rails 3.2 behaviour with fields_for and 
nested attributes.
    class ControllerAction < ActiveRecord::Base
      has_many :interactions, dependent: :destroy
      has_many :roles, through: :interactions
      scope :controllers, lambda {|name| where("controller_name_id = ?", 
name)}
      scope :actions, lambda {|name| where("action_name_id =
2011 Sep 06
1
Workers getting broken after some time
I have strange error that happens after couple of hours. Some instances 
start to respond on any request with status code 500. Log file 
unicorn.stderr.log gets populated with this error:
app error: undefined method `each'' for nil:NilClass (NoMethodError)
/usr/local/lib/ruby/gems/1.9.1/gems/rack-1.1.2/lib/rack/utils.rb:267:in 
`initialize''
2013 Aug 23
5
Ruby 2.0 Bad file descriptor (Errno::EBADF)
hi. i''ve been trying to upgrade my stack to ruby 2.0 but keep getting this on ubuntu (not on my local os x):
/hello/shared/bundle/ruby/2.0.0/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:746:in `for_fd'': Bad file descriptor (Errno::EBADF)
from /hello/shared/bundle/ruby/2.0.0/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:746:in `block in inherit_listeners!''
from
2012 Feb 29
2
[PATCH] Start the server if another user has a PID matching our stale pidfile.
If unicorn doesn''t get terminated cleanly (for example if the machine
has its power interrupted) and the pid in the pidfile gets used by
another process, the current unicorn code will exit and not start a
server. This tiny patch fixes that behaviour.
---
 lib/unicorn/http_server.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/unicorn/http_server.rb
2013 Nov 01
7
[PATCH] construct listener_fds Hash in 1.8 compatible way
This renables the ability for Ruby 1.8 environments to perform reexecs
---
 lib/unicorn/http_server.rb | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb
index 2decd77..9a5795c 100644
--- a/lib/unicorn/http_server.rb
+++ b/lib/unicorn/http_server.rb
@@ -449,13 +449,14 @@ class Unicorn::HttpServer
     end
 
    
2010 May 28
4
unicorn failing to start
Hi,
i''m trying to start up unicorn_rails with a rails 3 beta3 project. All I
can get out of it is this:
I, [2010-05-28T08:54:45.770957 #17852]  INFO -- : reaped
#<Process::Status: pid 17854 exit 1> worker=0
I, [2010-05-28T08:54:45.771200 #17852]  INFO -- : worker=0 spawning...
I, [2010-05-28T08:54:45.774049 #17858]  INFO -- : worker=0 spawned pid=17858
I,
2011 Aug 12
16
Rack content-length Rack::Lint::LintErrors errors with unicorn
Has anyone seen anything like this before?  I can get it to happen all
the time if I issue a HEAD request, but it only happens very
intermittently on GET requests.
I''m using Ruby 1.9.2p180.
Any ideas on where to start debugging?
204.93.223.151, 10.195.114.81 - - [11/Aug/2011 21:03:50] "GET /
HTTP/1.0" 200 37902 0.5316
app error: Content-Length header was 37902, but should be
2012 Apr 27
14
app error: Socket is not connected (Errno::ENOTCONN)
I''m getting the following errors multiple times per request when using
4.3.0.  I do not receive any errors when using 4.2.1.  Please CC me on
replies, I''m not subscribed to the mailing list.
16:48:42 web.1     | E, [2012-04-26T16:48:42.733954 #87940] ERROR -- :
app error: Socket is not connected (Errno::ENOTCONN)
16:48:42 web.1     | E, [2012-04-26T16:48:42.734193 #87940] ERROR
2013 Sep 20
3
[PATCH] preload_app can take an optional block for warmup
---
 lib/unicorn/configurator.rb    | 19 ++++++++++++++++---
 lib/unicorn/http_server.rb     |  3 +++
 test/unit/test_configurator.rb |  8 ++++++++
 3 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb
index 0d0eac7..a0ae576 100644
--- a/lib/unicorn/configurator.rb
+++ b/lib/unicorn/configurator.rb
@@ -441,9 +441,22 @@ class
2010 Jun 04
8
unicorn_rails cleanup (possible fix for Rails3) pushed
Hi all,
I''ve pushed the following patch out go git://git.bogomips.org/unicorn
along with a few other Rails-related test updates.  This is more of a
shotgun fix (but less code is better :) since I haven''t been able to
reproduce the brokeness people have been seeing with "unicorn_rails"
and Rails 3 betas.
Even though "unicorn" works perfectly well for Rails3,
2010 Feb 18
4
Rails 3 "RAILS_ENV not defined by config/boot" error
I''m running unicorn and unicorn-rails 0.96.1 and the latest Rails 3
beta gem. ?Firing up unicorn_rails spews "RAILS_ENV not defined by
config/boot". ?I know this is likely a result of RAILS_ROOT being
deprecated?in Rails 3 but I can''t seem to config my way around it.
I''m sure other people must have run into this before. ?Is there a
quick fix?
Thanks
2009 Oct 13
7
Unicorn Nginx Issue
I''ve setup nginx with this
server {
  listen 80;
  server_name unicorn.local;
  location / {
    proxy_pass http://unicorn;
  }
}
upstream unicorn {
  server unix:/Users/mattmongeau/projects/test/unicorn/tmp/sockets/unicorn.sock;
}
When I run unicorn_rails -c config/unicorn.rb -E development I can
access the application just fine on unicorn.local
When I run unicorn_rails -c
2013 Nov 05
4
Handling closed clients
We have a service that clients use to upload files. We have a couple of clients that are on slow links and so their upload times out. We get errors in the logs that I''d like to get rid of.
I was hoping that the recent commit 24b9f66dcdda44378b4053645333ce9ce336b413 would help us, but it does not. After digging in a bit, I have some ideas about why and a patch I''d like comments
2011 May 19
2
unicorn doesn't restart properly after cap deploy (not using Bundler)
Hey guys,
I''m sending USR2 to unicorn after cap deploy, and the old master is
getting replaced by a new master that doesn''t work.
Here are some similar threads I found ...
http://rubyforge.org/pipermail/mongrel-unicorn/2010-October/000733.html
http://rubyforge.org/pipermail/mongrel-unicorn/2010-October/000717.html
I''m not using Bundler, and I have working_directory
2012 Mar 22
1
[PATCH] make stderr_path/stdout_path support IO objects directly
---
 lib/unicorn/configurator.rb |    2 +-
 lib/unicorn/http_server.rb  |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb
index 89cbf5c..c9b6816 100644
--- a/lib/unicorn/configurator.rb
+++ b/lib/unicorn/configurator.rb
@@ -559,7 +559,7 @@ private
 
   def set_path(var, path) #:nodoc:
     case path
-    when
2013 Dec 09
2
[PATCH] rework master-to-worker signaling to use a pipe
Signaling using normal kill(2) is preserved, but the master now
prefers to signal workers using a pipe rather than kill(2).
Non-graceful signals (:TERM/:KILL) are still sent using kill(2),
as they ask for immediate shutdown.
This change is necessary to avoid triggering the ubf (unblocking
function) for rb_thread_call_without_gvl (and similar) functions
extensions.  Most notably, this fixes
2013 Mar 20
2
Problem With Unicorn
Hello All,
I deployed my application in the local server and i''m using unicorn and
nginx. I tried to run ''bundle exec unicorn_rails'' but it is showing ''ERROR:
Gem bundler is not installed, run `gem install bundler` first.''. even if I
run gem install bundler the bundler getting installed, But it is showing
the same error again i.e. Gem bundler is not
2012 Oct 12
3
[PATCH] explicitly use escaped minus in man pages
---
 man/man1/unicorn.1       |   32 ++++++++++++++++----------------
 man/man1/unicorn_rails.1 |   34 +++++++++++++++++-----------------
 2 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/man/man1/unicorn.1 b/man/man1/unicorn.1
index 0b496af..749272a 100644
--- a/man/man1/unicorn.1
+++ b/man/man1/unicorn.1
@@ -4,7 +4,7 @@
 unicorn - a rackup-like command to launch the Unicorn HTTP
2010 Sep 07
1
unicorn_rails and rails 2.3.8
First off, I love unicorn. Thanks to all who have worked on it.
For the first time, I am trying to run a rails 2.3 app with unicorn. I don''t understand what is not set correctly. I have rails 2.3.8 and dependencies installed. I am sure it is something simple.... See output below.
Much thanks!
Matt
config/environment.rb
...
RAILS_GEM_VERSION = ''2.3.8'' unless defined?
2010 Feb 14
6
Nginx Sock And Rails Envinroment Error
Hi There,
Im running an amazon instance with nginx proxying to a unicorn sock.
For some reason, even though i specify the production environment, when being visited by nginx, the site shows errors in  development form.
Interestingly, when running on a port rather than a sock, if i visit that port, the errors are rendered as normal with a 500 page, the same port, throught nginx, shows errors