unicorn

Rails Not able to access headers after moving to Digital Ocean

落花浮王杯 提交于 2019-12-11 13:13:19
问题 I have a rails app that serves the web and an Android client. I recently upgraded to Ruby 2.0 from 1.9.3. I went to do some work on the Android client and kept getting status 500 from the API. I return JSON data for each user by sending their auth_token in the headers. I checked the server logs to see what was up. This method was returning nil: def api_user my_auth = request.headers["auth_token"] api_user = User.where(authentication_token: my_auth).first end I hadn't touched my Android client

Unable to start unicorn on port 80 using capistrano

微笑、不失礼 提交于 2019-12-11 13:11:03
问题 cap production unicorn:start fails with the following error, trying to start my rails app on port 80. F, [2013-06-14T04:33:51.420113 #13986] FATAL -- : error adding listener addr=0.0.0.0:80 /home/ec2-user/apps/bdr_prod/shared/bundle/ruby/2.0.0/gems/unicorn-4.6.2/lib/unicorn/socket_helper.rb:147:in `initialize': Permission denied - bind(2) (Errno::EACCES) from /home/ec2-user/apps/bdr_prod/shared/bundle/ruby/2.0.0/gems/unicorn-4.6.2/lib/unicorn/socket_helper.rb:147:in `new' from /home/ec2-user

Server Ruby on Rails + unicorn + nginx stop responding

淺唱寂寞╮ 提交于 2019-12-11 12:54:46
问题 My server Rails worker normally, but after 10 minutes without a request its response is a bad gateway. I really think my configurations are in order, but it don't work. I don't have more ideas what to is happening. That my configurations: unicorn.rb: @dir = File.expand_path(File.dirname(__FILE__)) + "/.." worker_processes 2 working_directory @dir timeout 10 listen File.join('/tmp/nutrimais.sock') listen File.join('/tmp/nutrimais_2.sock') preload_app true# if ENV['RAILS_ENV'] != 'development'

Asset pipeline not working in rails production environment

一个人想着一个人 提交于 2019-12-11 08:31:59
问题 I'm having an issue deploying to a VPS using Rails. My app works fine in the development environment, but when I push to production using Capistrano, I run into issues. I am using unicorn, rails 3.2.13, and ruby 1.9.3 The issue I have is when I visit my production site, I get a 'template is missing' error: Template is missing Missing template site/index with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :haml]}. Searched in: * "/home/deployer/apps/my-app/releases

Cannot start unicorn.

狂风中的少年 提交于 2019-12-11 08:27:06
问题 I'm trying to start my app with unicorn, but cannot start. I've got an argument error parse_rackup_file: rackup file (config.ru) not readable (ArgumentError) My environment is rbenv ruby1.9.3 and rails 3.1.3. What's wrong? Mac-mini:rails_app Macmini$ cap deploy:start * executing `deploy:start' * executing "cd /home/deployer/public_html/rails_app/current/; bundle exec unicorn -c /home/deployer/public_html/rails_app/current/config/unicorn.rb -E production -D" servers: ["211.125.67.15"] [211.125

During cap deploy:cold - command not found for /etc/init.d/unicorn

和自甴很熟 提交于 2019-12-11 06:38:18
问题 I'm very close to having my first rails app live up on Linode VPS, but keep on getting a strange error message near the end of cap deploy:cold. I've been following railscasts 335 to deploy my Rails app to a VPS using nginx, Unicorn, PostgreSQL, rbenv and more (unfortunately for me from a Windows machine). I'm hosting on Linode Ubuntu 10.04 LTS Profile. Near the end of the deploy I get this error message: * ←[32m2013-04-24 13:08:13 executing `deploy:start'←[0m * ←[33mexecuting "sudo -p 'sudo

Rails 4 Unicorn Serve App Without ActiveRecord

可紊 提交于 2019-12-11 04:48:37
问题 I am building a rails 4 app that does not use any database. I have successfully disabled ActiveRecord on my development machine by following a few guides online by deleting database.yml and replacing require 'rails/all' with require "action_controller/railtie" require "action_mailer/railtie" require "rails/test_unit/railtie" require "sprockets/railtie" It works locally but when I try to deploy it on the server running unicorn, I get this on the err logs ERROR -- : ActiveRecord:

How to make unicorn run a Rails 3.0 app under a path?

余生长醉 提交于 2019-12-11 01:55:44
问题 I'm migrating from Passenger to Unicorn, and with Passenger I used to run my Rails 3.0 app with the RailsBaseURI option to prefix all URLs with '/blah' for example. When running the same app under Unicorn, I pass '--path /blah' to unicorn_rails, but the server still serves things as http://server:3000/etc/etc, instead of http://server:3000/blah/etc/etc - I see some assets being requested via /blah/ (like JS files, and so on), but the various links still do not have '/blah/' before them. So -

Paperclip in Production with Unicorn: uninitialized constant Paperclip (NameError)

假如想象 提交于 2019-12-11 01:27:25
问题 I added Paperclip to my app then tried to deploy to my VPS using capistrano. The deploy happens successfully, but when I try to access my app on the VPS, I get the Rails Error Page. There is no information in production.log , but unicorn.log has the following error: E, [2013-06-25T19:44:07.372060 #21995] ERROR -- : uninitialized constant Paperclip (NameError) /home/deployer/apps/arcsite/releases/20130625182331/config/initializers/paperclip.rb:1:in `<top (required)>' The initializer file is

Unable to start my Unicorn on Port 80 on Capistrano 3

若如初见. 提交于 2019-12-10 21:49:56
问题 I get the following error while trying to run "cap production unicorn:start" DEBUG [29ec5890] Command: cd /home/ec2-user/apps/current && ( RAILS_ENV=production BUNDLE_GEMFILE=/home/ec2-user/apps/current/Gemfile ~/.rvm/bin/rvm default do bundle exec unicorn -c /home/ec2-user/apps/current/config/unicorn/production.rb -E deployment -D ) DEBUG [29ec5890] RVM is not a function, selecting rubies with 'rvm use ...' will not work. DEBUG [29ec5890] DEBUG [29ec5890] You need to change your terminal