passenger

Deployment of Rails app using nginx, passenger and capistrano

我的梦境 提交于 2019-12-11 23:35:37
问题 I am deploying my first rails application. I have some trouble doing that. I will describe what I did till now. 1) I configured everything correctly by going through gorails.com 2) I am trying to deploy it on Digital Ocean 3) I performed cap deploy production and the end result was successful with some failures in middle. 4) I started nginx server 5) In my browser it gave me 500 error. 6) I checked my production.log and it showed all the migrations and seeds that it ran. It created tables

mongo + passenger: right way to reconnect to database from within rails? how to ensure optimal mongo performance?

自作多情 提交于 2019-12-11 21:08:36
问题 we're on rails 3.2.12, passenger + nginx (1.0.10), mongo 2.2, and mongomapper 0.12. we were told that passenger and mongo don't work well together unless there is a configuration set to ensure speedy database connections (or reconnections). however, one person advised us to use the code here: http://pastie.org/572282. then we found this post on stackoverflow (mongoDB, passenger and performance issues with phusion passenger), which is different. which is the right way to ensure optimal mongo

Cannot POST forms using Phusion Passenger with Sails.js/Node.js

帅比萌擦擦* 提交于 2019-12-11 20:59:41
问题 I have a site written with Sails.js that I'm trying to deploy to a server with Passenger on it, and so far I'm not having any luck. While all GET requests work, none of the POST requests seem to actually make it to the application. Everything works perfectly without Passenger. Test Controller : module.exports = TestController = show: (req, res) -> res.view() post: (req, res) -> res.send(200) Form : form(action='/test', method='POST') input(type='text', name='test', placeholder='foo') input

rbenv passenger cannot load such file — bundler/setup

柔情痞子 提交于 2019-12-11 20:00:33
问题 My passenger is installed as a gem. Nginx is installed by passenger-install-nginx-module . There are 3 gemsets for ruby 2.1.1, the rubygemset rails4_1 is the correct one for this app. Other posts show similar issues(1, 2, 3), but none of them resolves my problem. [ 2014-09-29 14:29:17.1212 13182/7f32e5938700 Pool2/Implementation.cpp:287 ]: Could not spawn process for application /home/canoe/apps/app1: An error occured while starting up the preloader. Error ID: b57602d4 Error details saved to:

Apache/Passenger rufus cron job not working

旧城冷巷雨未停 提交于 2019-12-11 19:25:36
问题 I have a Rails app running on Apache/Passenger. I have a rufus cron job that runs in the background and sends out notifications via email. When I am running the app in development on the WEBrick server, the emails are sent like they are supposed to be sent. When I start up the app in production on Apache/Passenger, then the emails dont get sent. The class doing the work is in config/initializers/task_scheduler.rb require 'rubygems' require 'rufus/scheduler' Rails.logger.info "Starting the

ActionView::Template::Error (application.css isn't precompiled) Rails

时光总嘲笑我的痴心妄想 提交于 2019-12-11 19:25:27
问题 I'm getting below in my production server: Started GET "/" for 101.160.190.206 at 2013-09-05 00:11:28 +1000 Processing by HomeController#index as HTML Rendered home/index.html.erb within layouts/application (0.5ms) Completed 500 Internal Server Error in 2ms ActionView::Template::Error (application.css isn't precompiled): 4: <meta name="viewport" content="width=device-width, initial-scale=1.0"> 5: <title><%= content_for?(:title) ? yield(:title) : "Tools" %></title> 6: <meta name="description"

Rails application doesn't work with apache2 and passenger

心不动则不痛 提交于 2019-12-11 18:22:33
问题 Can't make my rails 2.3.5 application work correctly with apache2. In apache errors log i get the following: /usr/lib/phusion_passenger/passenger-spawn-server:53:in `require': no such file to load -- phusion_passenger/utils (LoadError) from /usr/lib/phusion_passenger/passenger-spawn-server:53 [ pid=9437 file=ext/apache2/Hooks.cpp:727 time=2012-04-02 20:04:49.923 ]: Unexpected error in mod_passenger: Cannot spawn application '/home/user/projects/pname/trunk': The spawn server has exited

301 redirect in Passenger (Ruby on Rails) from root domain to www sub domain?

一曲冷凌霜 提交于 2019-12-11 16:42:35
问题 How can you create a permanent redirect (301) in Passenger? There are posts elsewhere on how to perform the redirect in Rails, but it seems better to do the redirect at the server level rather than at the Rails level. Any clues? Thanks! 回答1: Server-level redirects are done with the HTTP server, not the Application server. Here's some examples: Apache <VirtualHost xxx.xxx.xxx.xxx:80> ServerAlias example.com Redirect Permanent / http://www.example.com </VirtualHost> Nginx server { server_name

REST API : with Apache http web/content server Sinatra Passenger app server

我的未来我决定 提交于 2019-12-11 12:27:10
问题 I am totally newbiew to REST API and from all reading, got a little bit hands on with Sinatra as it looks really simple in terms of the syntax. However i am a little bit confused as to how a entire 3 tier set up with http web server and app server work. I am planning to learn by writing a simple web application which goes a little more than "hello world" . My setup I have 2 html page lets say a.html and b.html. a.html is my home page and I set it in htdocs i.e using Apache. In a.html i click