passenger

running a Rails app on a fresh installation of Nginx/Passenger causes error “no such file to load — bundler/setup (LoadError)”

安稳与你 提交于 2019-12-25 02:21:57
问题 I have a VPS running Ubuntu 12.04. I've installed Nginx and Passenger on it by following these and these instructions, and as per the instructions, I've added to the http block of file /etc/nginx/nginx.conf the following lines: passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini; passenger_ruby /usr/bin/ruby; and the following block (where I've replaced the actual domain name by www.example.com ): server { listen 80; server_name www.example.com; root /srv/rails/myapp

Sinatra Gem Won't Install

我们两清 提交于 2019-12-25 02:19:40
问题 I am running Ubuntu 10.04 on a linode trying to get sinatra, passenger, nginx, and rvm to all play nice with Ruby 1.9.2. I'm running into an issue with gems though: ~/.rvm/gems/ruby-1.9.2-p290/gems$ ls returns daemon_controller-0.2.6 fastthread-1.0.7 passenger-3.0.9 rack-1.3.2 rake-0.9.2 and gem list returns *** LOCAL GEMS *** rack (1.3.2) rake (0.9.2) sinatra (1.2.6) tilt (1.3.3) What is odd to me is that they aren't the same. And sinatra is missing from the .rvm gems. When I go to my

How to install nginx-full

血红的双手。 提交于 2019-12-25 00:34:08
问题 I'm trying to install nginx-full on my 12.04 machine(upgraded from 11.04) getting this error with apt-get-- The following packages have unmet dependencies: nginx-full : Depends: passenger-common (>= 1:3.0.17) but it is not going to be installed Depends: passenger-common (< 1:3.0.18) but it is not going to be installed E: Unable to correct problems, you have held broken packages. with aptitude getting this The following packages have unmet dependencies: nginx-light : Conflicts: nginx-full but

Updated Ruby in production and now Rails won't start because still referencing old ruby

只谈情不闲聊 提交于 2019-12-25 00:24:57
问题 Just updated Ruby on a staging server via RVM: $ rvm upgrade 1.9.3-p327 1.9.3-p362 I said 'yes' to all the migration and alias questions including deleting old Ruby. Now getting error from Passenger whenever I try to access Rails application: Error message: dlopen(/Library/WebServer/rails/myapp/shared/bundle/ruby/1.9.1/gems/bcrypt-ruby-3.0.1/lib/bcrypt_ext.bundle, 9): Library not loaded: /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/libruby.1.9.1.dylib Referenced from: /Library/WebServer/rails

When run on Phusion passenger, Bundler cannot find the Rails directory

穿精又带淫゛_ 提交于 2019-12-25 00:06:49
问题 So this is my problem. I used Capistrano to deploy my Rails 3 app to an Ubuntu server, which has Phusion Passenger 3 installed. Everything should have worked normal, but I kept getting this error message. Could not locate Gemfile in /var/www/rails/releases/20100916074325. (Bundler::GemfileNotFound) The directory in the error message (which I added for clarification) does exist on the system and so does the Gemfile. Underneath the error message, the stack trace showed the error is thrown

Apache with Passenger for Static HTML Pages

这一生的挚爱 提交于 2019-12-24 21:33:02
问题 I have a Sinatra app deployed on a Passenger server which is talking to Apache via Rack. I was wondering for the static pages if I need not go through the rack implementation as it would be a additional and necessary overhead to display static pages. So is there a way i can put a condition to Apache to respond to certain URI directly with the static pages and for some to pass it to the Passenger API? Is this possible via some configuration in Apache or does everything have to go via Rack? 来源:

How to run a very small amount of code asynchronously?

我与影子孤独终老i 提交于 2019-12-24 16:57:54
问题 I'd like to run a small amount of code asynchronously in my rails application. The code logs some known information. I'd like this task to not block the rest of the response from my app. The operation is way too lightweight and frequent for it to be done as a delayed job tasks. I'm thinking to just use: Thread.new do # my logging code end and call it a day. Is this achieving what I want it to achieve? Are there any drawbacks? 回答1: Aside from handling some baseline resource contention things,

uninitialized constant ApplicationController (NameError) - application works fine locally

流过昼夜 提交于 2019-12-24 16:32:58
问题 I've set up a simple application online on a rackspace cloud server but I'm getting the following error message from phusion passenger: uninitialized constant ApplicationController (NameError) /var/www/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/inflector/methods.rb:230:in `block in constantize' /var/www/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.12/lib/active_support/inflector/methods.rb:229:in `each' /var/www/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2

Directory listing instead of Rails site after Passenger/REE upgrade

跟風遠走 提交于 2019-12-24 11:04:02
问题 Having updated Passenger and Ruby Enterprise Edition to the latest versions today, I am now seeing a directory listing instead of my Rails app. Here's the Passenger part of my Apache config: #LoadModule passenger_module /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/passenger-2.1.3/ext/apache2/mod_passenger.so #PassengerRoot /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/passenger-2.1.3 #PassengerRuby /opt/ruby-enterprise-1.8.6-20090201/bin/ruby LoadModule passenger

Phusion Passenger memory consumption increase from 1.9.3 (system) to 2.1.2 (RVM) on Ubuntu

此生再无相见时 提交于 2019-12-24 10:46:33
问题 I have an Ubuntu system with 512MB physical RAM and 512MB swap. Running my four Rails 3.2.12 apps on Passenger 4.0.45 server (Apache module) using single-user (my user) RVM Ruby 2.1.2, it uses about 30% more memory than when I configure Passenger to use the older system (root) Ruby 1.9.3. That is the only difference in the Passenger config. This causes Passenger to move other applications to swap when one is accessed, which means each time a different application is accessed, it has to be