passenger

staging and live app with capistrano

老子叫甜甜 提交于 2019-12-04 07:40:24
I thought I'd do a simple yet potentially very useful thing, and create another symlink called live, that points to an arbitrary release, and leave current at the head where it usually is: 20120519235508 20120521004833 20120521024312 <-- live 20120521025150 20120521030449 <-- current I then configured www.mysite.com to hit live/public and stage.mysite.com to hit current/public Unfortunately both hosts seem to run the same app, and not 2 different apps. I've confirmed the httpd.conf has the correct settings and restarted it. However no change, they're both still running the same app, the app

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

你说的曾经没有我的故事 提交于 2019-12-04 07:10:21
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/environment.rb is not owned by root, but by a webapp user. I've tried setting passenger_default_user, I've

How to restart Phusion Passenger + Apache in Production mode on Ubuntu server for Ruby on Rails?

雨燕双飞 提交于 2019-12-04 06:46:23
I am having Apache + phusion passenger, I have put RailsEnv production in /etc/apache2/sites-available/default file and have restarted apache but when I am running rails c > Rails.env.production? it gives fales where as for > Rails.env.development? it gives true. Is there any other way to restart passenger as I do think putting "RailsEnv production" in default is the right way ? btw I am using sudo service apache2 restart How to start my ruby on rails app in Production mode with passenger + apache ? Your app is probably in production mode already. By default, rails c loads the app in

Incomplete response received from application

懵懂的女人 提交于 2019-12-04 06:36:27
问题 I want to deploy my rails app using phusion passenger in test environment DB. I have configured the following lines in my database.yml test: adapter: mysql2 database: testdb username: testuser password: pass host: x.x.x.x when I start the passenger "passenger start -a x.x.x.x -p 3000 -d -e test" it started working. but when I open the application URL in browser it should me an error like "Incomplete response received from application". I don't know what will be the problem? I have searched

Setting environment variables for Phusion Passenger applications

醉酒当歌 提交于 2019-12-04 06:21:09
I've set up Passenger in development (Mac OS X) and it works flawlessly. The only problem came later: now I have a custom GEM_HOME path and ImageMagick binaries installed in "/usr/local" . I can put them in one of the shell rc files that get sourced and this solves the environment variables for processes spawned from the console; but what about Passenger? The same application cannot find my gems when run this way. I know of two solutions. The first (documented here ) is essentially the same as manveru's—set the ENV variable directly in your code. The second is to create a wrapper around the

rufus scheduler not running in production

烂漫一生 提交于 2019-12-04 05:31:46
问题 I have a rails server running under nginx & passenger. My sheduler.rb looks like this require 'rufus-scheduler' my_awesome_job = Rufus::Scheduler.new my_awesome_job.cron '59 23 * * *' do #do something end Everything works fine if I set the job for the next 2-3 minutes (for test). But this one, as I need it in production, does not start at 23:59 every day. I don't know where is the problem. Thanks. 回答1: Most likely, this problem is caused by the Rufus scheduler background thread being

Ruby 1.9.1-p234, Passenger 2.2.5, Rails 2.3-stable closed stream on POST request

放肆的年华 提交于 2019-12-04 04:40:42
I've setup Ruby 1.9.1 (p234) on a Ubuntu server. I'm trying to deploy a Rails app which vendors Rails 2.3-stable on Apache 2.2/Passenger 2.2.5. GET requests work fine, POST requests break immediately with the following log entry: Processing UsersController#new (for 80.203.77.44 at 2009-10-24 20:54:55) [GET] Parameters: {"controller"=>"users", "action"=>"new"} Rendering template within layouts/application Rendering users/new Completed in 23ms (View: 20, DB: 0) | 200 OK [ http://myapp/user/new] /!\ FAILSAFE /!\ 2009-10-24 20:55:01 +0200 Status: 500 Internal Server Error closed stream /usr/local

invalid byte sequence in US-ASCII when trying to start rails app with phusion passenger

允我心安 提交于 2019-12-04 03:24:18
问题 I am trying to deploy a Rails 3 application on a Ubuntu production server using Phusion passenger and RVM. I have installed Phusion passenger successfully, but I get the following error when accessing the server on my browser : Ruby (Rack) application could not be started These are the possible causes: There may be a syntax error in the application's code. Please check for such errors and fix them. A required library may not installed. Please install all libraries that this application

Is there an easy way to run Garbage Collection outside of the request cycle in Passenger?

谁说我不能喝 提交于 2019-12-04 03:15:58
Unicorn has OobGC rack middleware that can be used to run GC.start after a certain number of requests. Is there a similar sort of thing in Phusion Passenger? Phusion Passenger 4 officially introduces an out of band garbage collection mechanism. It's more flexible than Unicorn's by allowing any arbitrary work, not just garbage collection. http://blog.phusion.nl/2013/01/22/phusion-passenger-4-technology-preview-out-of-band-work/ Hooking into PhusionPassenger::Rack::RequestHandler#process_request() is the only mechanism I have found. To do this in a similar way to the Unicorn OobGC, you can use

Capistrano and XSendFile configuration

两盒软妹~` 提交于 2019-12-04 02:35:37
问题 I am trying to configure Rails production server with Apache 2.2, Passenger 4.0.59 and XSendFile 0.12. Application is deployed via Capistrano. Deployed application produces (maybe large) PDF to #{Rails.root}/tmp and serves this file using send_file . The problem is that Capistrano uses symlinks to point to currently deployed version of application. XSendFile on the other hand dereferences symlinks and refuses to serve a file if its real location is outside document root even if it is allowed