passenger

Getting Rails production to run on port 80

你离开我真会死。 提交于 2019-12-06 10:50:48
I'm trying to get my rails app to run in production mode but I've been having a bit of difficulty. I'm using passenger with apache and am running Ubuntu 12.04. I have my production database configured and created, and passenger set up. Status is as follows: $ rvmsudo passenger-status Version : 4.0.56 Date : 2014-12-25 01:54:20 +0000 Instance: 7264 ----------- General information ----------- Max pool size : 6 Processes : 0 Requests in top-level queue : 0 ----------- Application groups ----------- However when I run rails server -e production , it still listens on port 3000 see below: $ rails

Django - Can't pass Environment Variable to Apache/Passenger on the WSGI Interface

谁说胖子不能爱 提交于 2019-12-06 10:26:02
I'm looking for a solution, I can't pass to apache a variable define in /etc/profile. Here is what I am trying to set: I have a django application that I deploy through Apache/Passenger (modrails) through the WGSI interface. In my settings.py I am using this python command : ENVIRONMENT = os.getenv('ENV', 'PROD') so if the ENVIRONMENT variable is not define it goes to the production settings by default. That is helping me to manage which DB I connect to and activate debugging tools. It is working in production because it is the default values, it's when I am on the DEV server that I can't get

Does/can Passenger use clusters like Mongrel?

£可爱£侵袭症+ 提交于 2019-12-06 08:02:54
问题 I'm just curious if Passenger does or can utilize clusters like Mongrel can. If so, how can I specifically run Passenger with clusters? I'm using nginx. And if not, how does it outperform Mongrel so well? 回答1: Mongrel Cluster just runs a specified number of Mongrel processes and assigns incoming HTTP requests to them using Apache's mod_proxy_balancer module which acts as a reverse proxy and performs load balancing. Passenger spawns worker (Ruby) processes to handle HTTP requests using one of

Rufus scheduler not logging in production

坚强是说给别人听的谎言 提交于 2019-12-06 04:41:32
My rails app kicks off a process with rufus-scheduler in an initializer. Here's a stripped-down version of the initializer's code: # config.logger isn't available here, so we have to grab it from the Rails object logger = RAILS_DEFAULT_LOGGER logger.warn(Time.now.to_s + ": Starting Rufus Scheduler") # run every Wednesday at 10 AM cron_string = '0 10 * * 3' scheduler = Rufus::Scheduler.start_new scheduler.cron cron_string do logger.warn(Time.now.to_s + ": Starting Background Process") (do work here) logger.warn(Time.now.to_s + ": Finished Background Process") end logger.warn(Time.now.to_s + ":

Seamless deployment in Rails

浪尽此生 提交于 2019-12-06 04:34:15
问题 I would like to seamlessly upgrade my Rails app: Meaning: If no migrations need to run I would like to transparently upgrade the code and have no requests go 404 during the deployment. This is hard I would like to have some process that can upgrade the database seamlessly and during that time just hold back on the web requests (queue them in the pipe) when the db update is done, allow stuff through. (I only need this to work for short migrations - like 5-10 second migrations). How would you

header variables go missing in production

廉价感情. 提交于 2019-12-06 04:32:27
问题 I'm running Rails 3.1 with PhusionPassenger and NGINX in the back. I'm sending requests via a simple HttpClient (GrahpicalHttpClient for OS X). My code expects a token and an ID in the header to verify the authenticity of the caller. In developement mode this is no problem, but once I move it into production the header variables go missing. Nothing is displayed. Here is the code: @caller = Person.check_authentication_token(request.headers['person_id'], request.headers['authentication_token'])

paperclip accepting jpg and png on production

限于喜欢 提交于 2019-12-06 04:17:55
问题 I'm using PaperClip plugin in my Rails application as follows: has_attached_file :photo, :styles => {:small => '64X64>', :medium => '250X250>'}, :url => "/assets/user_photos/:id/:style/:basename.:extension", :path => ":rails_root/public/assets/user_photos/:id/:style/:basename.:extension" # validates_attachment_presence :photo validates_attachment_content_type :photo, :content_type => ['image/jpeg', 'image/png','image/gif'] validates_attachment_size :photo, :less_than => 1.megabytes It works

Rails Nginx Passenger Cannot checkout session because a spawning error occurred

断了今生、忘了曾经 提交于 2019-12-06 03:49:42
问题 I have a Rails 3.2.14 app that deploys and operates fine on a production server. I'm working on deploying it to another server to test changes before I push out to production. I'm running the latest version of passenger/nginx and using Capistrano 2.12.0 with Ruby 1.9.3-p194 due to this being a legacy app and I'm trying to mimic the environment. I can deploy the app without a problem, but it won't spawn passenger and start up the app. Here's one of the errors I get in /var/log/nginx/error.log

Passenger problem: “no such file to load” — /config/environment

為{幸葍}努か 提交于 2019-12-06 03:48:37
问题 I've been researching this one and found references to similar problems here and there, but none of them has led to a solution yet. I've installed passenger (2.2.11) and nginx (0.7.64) and when I start things up and hit a Rails URL, I get an error page informing me of a load error: no such file to load -- /path/to/app/config/environment From what I've found online this appears to be some sort of a user/permissions error, but I've tried all the logical fixes: I've made sure that /config

Paperclip / Passenger NotIdentifiedByImageMagickError:

时光总嘲笑我的痴心妄想 提交于 2019-12-06 03:29:22
问题 When I try to upload a photo in Ruby on Rails using Paperclip on my local machine it works perfectly. When I try to upload a photo in Ruby on Rails using Paperclip on our Linux (CentOS 5.2) server with Apache and Phusion Passenger, I get: 2 errors prohibited this user from being saved There were problems with the following fields: - Avatar /tmp/stream20091026-21120-1qdbnul-0 is not recognized by the 'identify' command. - Avatar /tmp/stream20091026-21120-1qdbnul-0 is not recognized by the