unicorn

Why does this rackup file work with Thin, but not WEBrick or Unicorn?

一世执手 提交于 2019-12-25 02:19:42
问题 I am having a strange issue running my static website locally (for testing). Both WEBrick and Unicorn are causing an assertion failure in Rack when navigating to root. However Thin works perfectly. My rackup file 'config.ru': # This is the root of our app @root = File.expand_path(File.dirname(__FILE__)) + '/site' default_charset = "; charset=UTF-8" run Proc.new { |env| # Extract the requested path from the request path = Rack::Utils.unescape(env['PATH_INFO']) index_file = @root + "#{path}

How to access a website by IP address in a server that hosts many websites?

不想你离开。 提交于 2019-12-24 16:43:18
问题 I would like to know how to access websites by IP address in a server that hosts more than one web application? Currently I can get the IP address of the server, but it points to one site by default. Is there a prefix or suffix that I can add to the IP address to get a particular website in the server? Eg: I would like to access by IP address: http://mysubdomain1.domain.com http://mysubdomain2.domain.com http://mysubdomain3.domain.com The server hosts many ruby on rails web apps via nginx and

Nginx + configuration error

試著忘記壹切 提交于 2019-12-24 12:34:14
问题 I've been trying to config a vh file but I end up in this error: I have this config file scraped from unicorns github site. # This is example contains the bare mininum to get nginx going with # Unicorn or Rainbows! servers. Generally these configuration settings # are applicable to other HTTP application servers (and not just Ruby # ones), so if you have one working well for proxying another app # server, feel free to continue using it. # # The only setting we feel strongly about is the fail

Unicorn error: “ERROR — : reaped #<Process::Status: pid 12345 SIGABRT (signal 6)> worker=2”

我是研究僧i 提交于 2019-12-24 10:51:34
问题 We get errors like this one daily (sometimes more than once): Apr 13 12:16:31 app1 unicorn.log: E, [2014-04-13T12:16:31.302011 #17269] ERROR -- : reaped #<Process::Status: pid 17300 SIGABRT (signal 6)> worker=2 We use Unicorn 4.8.2 with a Ruby on Rails app. It doesn't seem to happen at any obvious time, like during or just after deploys. We're not sure how to debug this – any suggestions on either what the problem could be, or how to debug it? 回答1: Turns out it was simply that our monit did a

Why is “rails runner -e production” not working?

孤人 提交于 2019-12-23 20:23:38
问题 To solve my problem, which is discussed in "will_paginate error in production undefined method 'paginate'", I tried running: script/rails runner -e production and: bundle exec script/rails runner -e production on the server like suggested in this github issue: https://github.com/mislav/will_paginate/issues/308#issuecomment-17167158 But I get the following error: bundler: command not found: script/rails Install missing gem executables with `bundle install` Bundle install doesn't help. Any

Unicorn worker timeout on AWS boxes

随声附和 提交于 2019-12-23 19:08:42
问题 I'm trying to setup a Unicorn on an AWS box, but the workers just keep timing out and I don't know why. I'm using a Ubuntu Server 14.04 LTS AMI, installing everything needed for a standard Ruby on Rails installation. Using rails new, I generate an empty app and attempting to access it the first time seems to be fast, but after that the workers just timeout continuously and takes forever to serve the webpage. Loading a standard WEBrick server does not have this problem and loads pages almost

Unicorn multiple machines setup [closed]

烈酒焚心 提交于 2019-12-23 02:41:49
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I have a good experience with Unicorn configuration with conjunction of Nginx, it works really well after optimizations and tuning procedures. But now I have got a question what is the best way to spread the load across multiple machines with Unicorns. The question is you have 3 machines (Nginx load balancer, 2

Error Messages Showing in Production - Ruby on Rails 3.1, Nginx, Unicorn

心已入冬 提交于 2019-12-23 00:47:06
问题 I have a Rails 3.1 app running in production using Nginx and Unicorn. And for some reason, my custom 404 and 500 html error pages are not showing. Instead I'm getting the actual error message ("Routing Error", for example). In my production.rb file, I have config.consider_all_requests_local = false And on the same server with a nearly identical configuration, I have a 'staging' site that works just fine. The only difference, as far as I can tell, is that the production one has SSL while the

Nginx failed (13: Permission denied) when start rails with unicorn

試著忘記壹切 提交于 2019-12-22 10:13:55
问题 My rails app runs on server with Unicorn and Nginx , but after configure Nginx and start it, i got the error: 2015/08/03 15:43:44 [crit] 13951#0: *1 stat() "/home/ec2-user/apps/mybest/current/public//index.html" failed (13: Permission denied), client: 123.185.144.80, server: 52.74.148.194, request: "GET / HTTP/1.1", host: "52.74.148.194" 2015/08/03 15:43:44 [crit] 13951#0: *1 stat() "/home/ec2-user/apps/mybest/current/public/.html" failed (13: Permission denied), client: 123.185.144.80,

Upload with paperclip very slow (unicorn)

强颜欢笑 提交于 2019-12-22 08:57:30
问题 Sitting here with a simple rails 3 app in which I have a simple Gallery model and each gallery has many images. The image model is extended with paperclip and with the following options has_attached_file :local, :styles => { :large => "800x800>", :medium => "300x300>", :thumb => "100x100#", :small => "60x60#" } In my galleries_controller I have the following action that is implemented in order to work with the jQuery-File-Upload plugin. thereby the json response. def add_image gallery =