passenger

Dragonfly Gem with ImageMagick and Passenger

雨燕双飞 提交于 2019-12-11 00:19:08
问题 I was having some problems getting the dragonfly gem to play nicely with passenger. Passenger doesn't seem to use the current $PATH so it can't find the convert binary. I've added some configuration to dragonfly which seems to solve the issue: require 'dragonfly/rails/images' Dragonfly[:images].configure do |c| c.convert_command = "/usr/local/bin/convert" # defaults to "convert" c.identify_command = "/usr/local/bin/convert" # defaults to "convert" end but the gem i'm working on is going to be

Confirmation token mentioned twice in GET request, but only once in the URL?

久未见 提交于 2019-12-11 00:08:26
问题 I'm facing a strange bug when I follow confirmation link from devise email. The link is correct: .../ru/users/confirmation?confirmation_token=yDNePwDTbxBzy5PqZE1e However in server log I get: Started GET "/ru/users/confirmation?confirmation_token=yDNePwDTbxBzy5PqZE1e?confirmation_token=yDNePwDTbxBzy5PqZE1e" As you see it is mentioned twice. For this reason I can't confirm the email. The strangest thing is that it works in webrick, and I only see this issue in production (which happen to be

passenger config.ru permission denied

被刻印的时光 ゝ 提交于 2019-12-10 23:37:30
问题 Did anyone go through ERR_EMPTY_RESPONSE under the combination of rails + nginx + passenger? nginx error.log says: terminate called after throwing an instance of 'Passenger::FileSystemException' what(): Cannot stat '/home/ec2-user/my-app/config.ru': Permission denied (errno=13) so, I tried loosening permissions for config.ru and its containing directory by using chmod 777 config.ru chmod 777 my-app but it results in the same error message. I will appreciate any help. 回答1: You need to loosen

Sinatra on Passenger always fails on first attempt

感情迁移 提交于 2019-12-10 23:08:47
问题 I have a small Sinatra app I'm running on a shared hosting account using Passenger. However, the first time the app is accessed after a while, I get a Passenger error page saying the application could not be started. Usually because Sinatra could not be found. I am assuming this is just a normal delay from when a new instance is spawned. However, is there a way to delay trying to load Siantra until it Passenger has fully loaded? 回答1: I seem to have solved the issue by setting the GEMS_PATH

Ruby on Rails application won’t start using Passenger when there are non-ASCII characters in the app path

风格不统一 提交于 2019-12-10 23:06:59
问题 I have a problem running a Ruby on Rails application using Passenger. My application resides in the /Users/Glutexo/Práce/Bytek/Bytek directory, which you can see has a non-ASCII character in in (á). Even when I symlink it into another directory, e.g. /Library/WebServer/Documents/Bytek with all characters being US-ASCII, the problem is still there. But when I create another Rails application physically in all US-ASCII path, like /Users/Glutexo/rails/pokus, it works: The application starts and

How rails server on production works?

时光总嘲笑我的痴心妄想 提交于 2019-12-10 20:38:42
问题 I wonder, in general is it more like PHP (it loads into memory, executes, and dies for each connect). Or it like Node.js (single instance stays in memory and accepts all requests) 回答1: Technically it's the latter, but depending on the application server, it can be made to look like the former because the former is easier to manage. One example is Phusion Passenger. Take a look at https://www.phusionpassenger.com/ and http://www.modrails.com/documentation/Architectural%20overview.html 回答2:

Redmine Performance Inconsistency

主宰稳场 提交于 2019-12-10 19:44:26
问题 I have a redmine instance deployed on a Linux x86_64 system and I am struggle with a funny performance inconsistency issue. It behave like this: Leave it alone for a couple of hours (no request to the application at all) then establish a connection, it takes a very long time to response to the first few requests (can be as bad as 15 seconds+, sometimes every for response at about 1 minute). After the first few requests, it performance very quickly, almost instantly where I can see from the

In Rails, what could cause a user to have another user's session?

ε祈祈猫儿з 提交于 2019-12-10 18:42:56
问题 I have a Rails application using with an authentication system using Restful Authentication without any modification. Users have reported finding themselves logged in as the wrong user. In at least one case it was on their very first page view, never having logged in before. Is it possible their session ids are getting mixed up? Would switching to CookieStore make it impossible for this to happen since no session data is stored on the server this way? I suspect the problem is related to

Intermittent “premature end of script headers” with Rails 3.1

时光总嘲笑我的痴心妄想 提交于 2019-12-10 18:35:49
问题 So I've started upgrading our app to Rails 3.1 from Rails 3.0.9. It's working great in the development environment. The time has come to put it up onto the staging server so we can run some full acceptance tests -- but oh, no! We're getting the horrible " Internal Server Error " pages served back at us half of the time, seemingly randomly. We're using Ruby 1.9.2 (p290) Apache (2) and Passenger (3.0.9). Absolutely nothing is being written to our app's log file when these happen (even at the

Does phusion passenger use forking, and if so, where to set after_fork config?

一世执手 提交于 2019-12-10 17:43:38
问题 Does phusion passenger use forking? If so, where should I set an after_fork configuration, as recommended by Heroku for unicorn (re: Setting up PostGIS with Rails)? From Heroku's docs: Additionally, if unicorn or any other process forking code is used where the connection is re-established, make sure to override the adapter to postgis as well. For example: # unicorn.rb after_fork do |server, worker| if defined?(ActiveRecord::Base) config = Rails.application.config.database_configuration[Rails