passenger

Does/can Passenger use clusters like Mongrel?

…衆ロ難τιáo~ 提交于 2019-12-04 14:16:05
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? 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 three different and configurable strategies . When Passenger's smart spawning method is used it is able to

How to get rufus-scheduler working with a Rails app deployed to Heroku?

ぃ、小莉子 提交于 2019-12-04 13:35:16
问题 In ./config/initializers I've created a file called task_scheduler.rb and it contains the following code: require 'rufus-scheduler' require 'mechanize' scheduler = Rufus::Scheduler.new scheduler.every("1h") do puts "Starting Rufus Scheduler - Task 1 - Checking exampleShop for new orders" a = Mechanize.new a.get('http://exampleshop.nl/admin/') do |page| # Select the login form login_form = page.forms.first # Insert the username and password login_form.username = 'username' login_form.password

rufus cron job not working in Apache/Passenger

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 12:14:47
I have a Rails app running on Apache/Passenger. It has a rufus-scheduler cron job that runs in the background and sends out notifications via email. When I am running the app in development on the WEBrick server, the emails are sent like they are supposed to be sent. When I start up the app in production on Apache/Passenger, the emails don't get sent. In the production logs it doesn't show any logs for rufus-scheduler. I'm stuck in this problem. Your help will be appreciated, thank you in advance. The easiest solution is to set PassengerSpawnMethod to direct . The Phusion Passenger

I'm getting 403 error using passenger for rails in apache

浪子不回头ぞ 提交于 2019-12-04 11:46:58
问题 I've already installed the needed tools, and followed several tutorials trying to make passenger respond. I can access static files in public folder (public/500.html or 422.hml). Yesterday I entered through a vhost, and found some passenger errors. But some time later the hosting restarted the service, and since then I have not been able to access the rails app again. link link link These are some of the links I used to configure the server. I've also read that could be a permission issue; I

paperclip accepting jpg and png on production

南楼画角 提交于 2019-12-04 11:30:34
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 fine on development(Mac OSX + Mongrel). But when I put it in production (Linux Debian + Apache/Passenger

Issue with Passenger - Apache

試著忘記壹切 提交于 2019-12-04 11:08:45
Running in a Linode slice with Ubuntu 10.04 LTS. I am getting a 500 Internal Server Error. The Apache log has: Apache/2.2.14 (Ubuntu) Phusion_Passenger/2.2.7 configured -- resuming normal operations caught SIGTERM, shutting down * Passenger could not be initialized because of this error: The Passenger spawn server script, '/usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.0/lib/phusion_passenger/passenger-spawn-server', does not exist. Please check whether the 'PassengerRoot' option is specified correctly. But when we run: sudo passenger-install-apache2-module. Passenger does not complain. On

Rack Error with DreamHost, Passenger, and Rails 3.0.0.rc

梦想的初衷 提交于 2019-12-04 09:49:58
Background: I have viewed this question as well as this one - sadly, to no avail. Error Message (Passenger): You have already activated rack 1.1.0, but your Gemfile requires rack 1.2.1. Consider using bundle exec. my Gemfile: source 'http://rubygems.org' gem 'rails', '3.0.0.rc' gem 'nifty-generators' gem 'nokogiri' group :after_initialize do gem 'feedzirra' end my Gemfile.lock has this line: rack (1.2.1) my environment.rb has this line at the top: ENV['GEM_PATH'] = File.expand_path('~/.gems') + ':/usr/lib/ruby/gems/1.8' my boot.rb has this line at the top: Gem.clear_paths I have rack (1.2.1)

Can't force Rails into production environment via Passenger/Nginx

左心房为你撑大大i 提交于 2019-12-04 09:36:18
问题 I'm having trouble getting a Rails app to run in the production environment via Phusion Passenger on Nginx/Ubuntu. According to the docs, the environment is controlled by the rails_env option in nginx.conf ... but it runs in development mode on our box regardless of whether we specify 'rails_env production;' or leave it out (the default is said to be production). Other notes: The Linux environment variable RAILS_ENV is also set to production. We can run in production mode using 'script/server

Rails: is Passenger Standalone suitable for production deployment?

≯℡__Kan透↙ 提交于 2019-12-04 09:33:39
问题 The question title pretty much sums it up... I haven't been able to find any good resources that outline the pros / cons of using Phusion Passenger Standalone for Rails App Deployment. How does it compare to running Passenger Nginx or Passenger Apache? Do things like .htaccess continue to work as expected? Any insight would be greatly appreciated! Thanks! 回答1: Standalone is built on top of Nginx. You can directly attach it to port 80 and it'll behave pretty much like Phusion Passenger + Nginx

Paperclip / Passenger NotIdentifiedByImageMagickError:

て烟熏妆下的殇ゞ 提交于 2019-12-04 08:04:36
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 'identify' command. I tried adding: Paperclip.options[:command_path] = "/usr/local/bin" to production.rb