passenger

Ruby on Rails 3 + Apache2 + Phusion Passenger: Bundler::GemNotFound exception

家住魔仙堡 提交于 2019-11-29 07:25:41
问题 I'm trying to deploy a Rails app on an Apache2 server by using Phusion Passenger. While everything works well locally, I am getting the infamous "Bundler::GemNotFound" error while deploying: Could not find abstract-1.0.0 in any of the sources (Bundler::GemNotFound) All my gems are installed in my local home folder. Thus the passenger configuration lines from my Apache2 configuration file are as follows: LoadModule passenger_module /home/regis/.gem/gems/passenger-3.0.7/ext/apache2/mod

How do I configure `Access-Control-Allow-Origin` with rails, nginx and passenger?

左心房为你撑大大i 提交于 2019-11-29 07:20:37
问题 I cannot get Access-Control-Allow-Origin to show up in Chrome - my ultimate goal is to configure CORS for fonts with Rails, so it works in production with CloudFront. For now though, I just want to get it to work in development . I can see the header via curl , but not Chrome. I am using Rails 4.0 , and I have tried all of the following... I have configured Gemfile and application.rb as per the rack-cors example for rails 4: Gemfile gem 'rack-cors', '~> 0.2.9', require: 'rack/cors' config

Rails app randomly crashes with error “Premature end of script headers”

◇◆丶佛笑我妖孽 提交于 2019-11-29 06:01:37
I am hosting a Ruby on Rails 2.0.2 application on DreamHost. It is on an Apache 2 server, running on top of Phusion Passenger. The application often returns a 500 error "Rails application failed to start properly", but at random times. It appears to happen when the application is under higher load, though I can't confirm this. It only gets about 2,000 pageviews per day, so I don't think load should really be an issue. The Apache logs correlate these 500 responses with the error: "Premature end of script headers". Just looking at the logs at 9 AM today, the error appears as often as three or

Apache's limit to POST request size

五迷三道 提交于 2019-11-29 03:48:06
Is there any limit of the POST request size in apache? What is the default value of this limit and is there any way to increase it? If it matters, Rails application is started on this server using passenger. The limit in Apache is set via the LimitRequestBody directive and defaults to 0 : This directive specifies the number of bytes from 0 (meaning unlimited) to 2147483647 (2GB) that are allowed in a request body. Take a look at the full description of Apache's LimitRequestBody directive . Besides that Rails may impose a limit itself (cant't tell though b/c I've never programmed in Ruby). 来源:

Nginx/Passenger/Rails, where to set RAILS_ENV?

不羁的心 提交于 2019-11-29 02:18:24
问题 I've deployed my site to its testing location, but I'm not sure where I set what the RAILS_ENV should be for this server. Where should I look? 回答1: Short Answer: passenger_app_env development; Sets: RAILS_ENV RACK_ENV WSGI_ENV NODE_ENV PASSENGER_APP_ENV Example nginx conf: http { passenger_root /home/user/.rvm/gems/ruby-2.1.0@app/gems/passenger-4.0.29; passenger_ruby /home/user/.rvm/wrappers/ruby-2.1.0@app/ruby; passenger_app_env development; } 回答2: You can use rack_env directive to set the

Passenger/mod_rails fails to initialize in Fedora 12 when starting Apache

ぐ巨炮叔叔 提交于 2019-11-29 01:59:29
I am in the process of setting up a server to run a Ruby on Rails application on Fedora 12, using Passenger. I am at the stage where I've installed Passenger, set it up as prescribed, but get the following errors when I restart Apache: [Wed Jan 13 15:41:38 2010] [notice] caught SIGTERM, shutting down [Wed Jan 13 15:41:40 2010] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0 [Wed Jan 13 15:41:40 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Jan 13 15:41:40 2010] [error] *** Passenger could not be initialized because of this

Passenger installation with nginx fails

扶醉桌前 提交于 2019-11-29 00:24:59
问题 I'm running an ubuntu 9.10 server on an amd-64 platform. Everything's pretty much standard, and I've got Sinatra 0.94 running on a ruby 1.8 installation. I want to install passenger in order to easily configure ssl. The problem is, it fails to find the installer. I run sudo gem install passenger or sudo gem install -r passenger and then the next line, passenger-install-nginx-module or passenger-install-apache2-module both fail because the path isn't found. Is there something I'm forgetting

Broken precompiled assets in Rails 3.1 when deploying to a sub-URI

主宰稳场 提交于 2019-11-28 21:58:21
I'm in the process of updating a Rails 3 app to use Rails 3.1 and as part of that, am making use of the new asset pipeline. So far, I've got everything working apart from one rather annoying problem I can't solve. The application and all its assets works fine in development, but in production it is deployed to a sub-URI using Passenger ( http://the-host/sub-uri/ ). The problem with this is that the assets are pre-compiled during deployment and one of my CSS (well, it's a .css.scss file) files is making use of the image-url helper from the sass-rails gem. Since during the pre-compilation

Rails file upload size limit

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-28 21:41:50
Does anyone know a good solution to limit the file upload size when running a Rails application with Passenger/mod_rails. The request should immediately be declined, so that the file doesn't get transferred to the server. The solutions I've found so far all describe how to patch Mongrel to implement a limitation, but I have to use passenger with this application. Or if you're using nginx with passenger, add in the server block: server { client_max_body_size 100M; } http://wiki.nginx.org/NginxHttpCoreModule#client_max_body_size You may cap the upload size via Apache using the LimitRequestBody

deploying rails3 apps with bundler and phusion passenger: .bundle dir not found

那年仲夏 提交于 2019-11-28 20:50:16
i am trying to deploy rails3 apps with the latest phusion passenger 2.2.11 and ruby-enterprise-1.8.7-2010.01. i am using bundler, but passenger seems to not be able to find the .bundle dir. error message: git://github.com/rails/rails.git (at master) is not checked out. Please run `bundle install` (Bundler::PathError) where do i install the .bundle? where do i tell passenger which bundle to use? any hints? thanks! i think the command you are searching for is bundle pack which will move your gems from the .bundle directory to the vendor/cache. see yehuda katz' posting about bundler workflows on