passenger

Capistrano and XSendFile configuration

♀尐吖头ヾ 提交于 2019-12-01 14:24:10
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 by XSendFilePath . Apache's error.log states: (20023)The given path was above the root path: xsendfile:

Rails 4 subdomains does not work on production

浪尽此生 提交于 2019-12-01 06:41:19
I've created an Rails 4 application with 3 sub-domains. Development domains: mydomain.dev api.mydomain.dev account.mydomain.dev Production domains (Ngnix with Passenger): app.mydomain.com (www.mydomain.com and mydomain.com show other page, not the application) api.mydomain.com account.mydomain.com My config/routes.rb looks like that: Rails.application.routes.draw do namespace :api, constraints: { subdomain: 'api' }, path: '/', defaults: { format: :json } do namespace :v1 do resources :clients, only: [:create, :show] end end namespace :account, constraints: { subdomain: 'account' }, path: '/'

404 Not Found error in deploying rails 3.2.12 app (with engines) to SUB URI on nginx/passenger

99封情书 提交于 2019-12-01 05:31:19
问题 We need to deploy a rails 3.2.12 app to sub uri nbhy on a ubuntu 12.04 server. The rails app has 3 engines and one of them is authentify which is for user authentication. The main app's root pointing to authentify's signin page. Here is the routes.rb in main app: root :to => "authentify::sessions#new" match '/signin', :to => 'authentify::sessions#new' match '/signout', :to => 'authentify::sessions#destroy' match '/user_menus', :to => 'user_menus#index' match '/view_handler', :to =>

Rails Passenger Glyphicon CORS Cloudfront NGINX Issue

佐手、 提交于 2019-12-01 05:21:50
So I am aware that stackoverflow is wrought with these questions about CORS Nginx, Cloudfront and Heroku but for some reason I can't get it to work. I have been following this question's answer: How do I configure `Access-Control-Allow-Origin` with rails, nginx and passenger? However I can't seem to figure out where to put the custom code block: config/nginx.conf.erb Next, edit the configuration file config/nginx.conf.erb by finding a block that looks as follows: location @static_asset { gzip_static on; expires max; add_header Cache-Control public; add_header ETag ""; } ...and add the two

Apache/Rails/Passenger Displaying Site Index?

流过昼夜 提交于 2019-12-01 05:17:24
I have a Rails app that I have successfully tested with Mongrel and Webkit. Now I want to test deployment. I set up a VMWare Image using Ubuntu 8.04. I have installed Rails following this method https://help.ubuntu.com/community/RubyOnRails with the exception of using Gems 1.3 instead of 1.2. I have configured and installed Passenger. However, when I visit my sites index ( http://some.ip.that.i 'm.testing/) I simply get the directory index of my rails site. I should note that since I'm testing I just dumped my app in /var/www. My Apache2 error.log file shows this and this only: [Tue Sep 30 15

Rails 4 subdomains does not work on production

落花浮王杯 提交于 2019-12-01 04:53:17
问题 I've created an Rails 4 application with 3 sub-domains. Development domains: mydomain.dev api.mydomain.dev account.mydomain.dev Production domains (Ngnix with Passenger): app.mydomain.com (www.mydomain.com and mydomain.com show other page, not the application) api.mydomain.com account.mydomain.com My config/routes.rb looks like that: Rails.application.routes.draw do namespace :api, constraints: { subdomain: 'api' }, path: '/', defaults: { format: :json } do namespace :v1 do resources :clients

Rails Passenger Glyphicon CORS Cloudfront NGINX Issue

梦想与她 提交于 2019-12-01 02:16:48
问题 So I am aware that stackoverflow is wrought with these questions about CORS Nginx, Cloudfront and Heroku but for some reason I can't get it to work. I have been following this question's answer: How do I configure `Access-Control-Allow-Origin` with rails, nginx and passenger? However I can't seem to figure out where to put the custom code block: config/nginx.conf.erb Next, edit the configuration file config/nginx.conf.erb by finding a block that looks as follows: location @static_asset { gzip

How to Install PCRE Development Headers on Mac OSX

坚强是说给别人听的谎言 提交于 2019-11-30 22:36:12
问题 I just upgraded my MacBook Pro to Mavericks and my local Ruby on Rails development environment isn't running straight off the bat, when I visit localhost I see It works! and remembered I needed to start Phusion Passenger, so when I run passenger start it checks all the prerequisites and fails when it gets to the PCRE Development Headers: * Checking for PCRE development headers... Found: no It tells me to go to http://www.pcre.org/ to download them so I downloaded 8.33 from here which went to

Routing Error with Post/Put requests (Passenger Headers)

ぃ、小莉子 提交于 2019-11-30 21:34:32
I've run into a weird problem and after a bunch of research can't get any closer. I've got several forms that upload files via Carrierwave. When I upload the information, part of the route gets cut off (I think). For example, I have a multi-part form submitting to: https:/domain/programs/223/add_file as POST but on submission I get the error No route matches [POST] "/223/add_file" even though what's in my address bar is the complete route. And if submit the complete route as a GET request it works fine. When I run rake routes the route shows up just fine. Here is a subset of my route:

Authlogic doesn't work with my Rails 3.2 app

最后都变了- 提交于 2019-11-30 20:12:34
I'm running Rails 3.2 and the latest version of Authlogic. When I run my app locally on my Mac, it works fine. When I try to run it on my production server (Ubuntu with Passenger/Apache), I get this: You must establish a database connection before using acts_as_authentic I'm not sure how to troubleshoot the problem. I posted this related question earlier today before I realized that the problem was broader than I thought. I figured out the problem. Look at this snippet from Authlogic's lib/authlogic/acts_as_authentic/base.rb : private def db_setup? begin column_names true rescue Exception