passenger

SQLite3::IOException: disk I/O error on SELECT

丶灬走出姿态 提交于 2019-12-10 17:11:42
问题 I have a Sinatra application using the Sequel gem against a sqlite3 database. I've been developing on a MacBook Pro running Mavericks. I have been running the app locally using the shotgun gem and everything has been working just fine. Recently I decided to run the application with Passenger and Nginx. When I run the application under passenger/nginx, the app errors out with the following in the logs App 17805 stdout: E, [2014-02-09T20:44:42.491448 #17805] ERROR -- : SQLite3::IOException:

How do I set my RAILS_ENV with Passenger and Apache?

为君一笑 提交于 2019-12-10 15:27:11
问题 I've been everywhere today looking for the way to properly set my RAILS_ENV for Passenger. I want to use the test environment now that the site is on my server, but I don't want it to be production because I'm having database issues. I've been directed to this part of the documentation, but it didn't make any sense to me. I had PassengerAppEnv RAILS_ENV = 'test' in my Apache .conf file for the site and -- as expected -- that didn't' work. I've also set RAILS_ENV = 'test' in config/environment

Dealing with incompatible character encodings: UTF-8 and ASCII-8BIT

落爺英雄遲暮 提交于 2019-12-10 14:19:52
问题 I am encountering an incompatible character encoding error in production. I tried to reproduce it locally but had no luck. This is the error message: A ActionView::Template::Error occurred in controller_name#action_name: incompatible character encodings: UTF-8 and ASCII-8BIT activesupport (3.0.5) lib/active_support/core_ext/string/output_safety.rb:80:in `concat' config.encoding is already set to "utf-8" in application.rb. What's perplexing to me is that the issue persists only for some time

Rails 2.3.3 - Setting to production mode

爷,独闯天下 提交于 2019-12-10 13:40:17
问题 How do I set the application to production mode? Okay, this must be a no-brainer but I'm about to deploy my first Rails app and I've got everything setup properly: Ubuntu Hardy, Passenger, MySQL. However, it's still running in development mode. I've only been able to find documentation for older versions of Rails and want to make sure that I'm doing it right. Thanks in advance. 回答1: You'll need to set the RackEnv instead of RailsEnv. Actually, I just do both (although I mightn't need to...?).

Bundler error with passenger-install-nginx-module on ubuntu 14.04

烈酒焚心 提交于 2019-12-10 13:16:45
问题 I am installing passenger + nginx on ubuntu 14.04 & ruby 2.2.4 . There are bundler errors with passenger-install-nginx-module $passenger-install-nginx-module /home/ubuntu/.rvm/gems/ruby-2.2.4/gems/bundler-1.13.1/lib/bundler/rubygems_ext.rb:45:in `full_gem_path': uninitialized constant Bundler::Plugin::API::Source (NameError) from /home/ubuntu/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb:144:in `block in full_require_paths' from /home/ubuntu/.rvm/rubies/ruby

No log messages in production.log

时光总嘲笑我的痴心妄想 提交于 2019-12-10 12:43:08
问题 I wrote a demo HelloWorld Rails app and tested it with WEBrick (it doesn't even use a DB, it's just a controller which prints "hello world"). Then I tried to deploy it to a local Apache powered with Passenger. In fact this test is just to get Passenger working (it's my first deploy on Apache). Now I'm not even sure that Passenger works, but I don't get any error on the Apache side. When I fire http://rails.test/ the browser shows the Rails 500 error page - so I assume that Passenger works. I

Passenger and Apache2 Display File Directory Structure rather than application

若如初见. 提交于 2019-12-10 12:11:22
问题 I setup rails app on passenger-3.0.9 and apache2. But when in execute rails through apache2 i.e http/localhost it shows the rails app file structure.and not run the app. My logs are [Sat Nov 12 21:20:36 2011] [notice] Apache/2.2.17 (Ubuntu) Phusion_Passenger/2.2.11 PHP/5.3.5-1ubuntu7.3 with Suhosin-Patch configured -- resuming normal operations <VirtualHost *:80> ServerName localhost DocumentRoot /var/www/project_name <Directory /var/www/project_name> Options Indexes FollowSymLinks

Rack / Passenger fails on Dreamhost

妖精的绣舞 提交于 2019-12-09 19:36:23
问题 I am new to Rails & Ruby and have been following the http://ruby.railstutorial.org/ruby-on-rails-tutorial-book and amy trying to deploy the demo app to my Dreamhost passenger enabled host and when I try to run the app if fails with: Ruby (Rack) application could not be started and the following backtrace (formatting the best I can): # File Line Location 0 /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/setup.rb 10 in `exit' 1 /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/setup

My passenger powered Rails app sometimes needs a long time to load

牧云@^-^@ 提交于 2019-12-09 17:56:08
问题 I use Apache + Passenger to host some Rails applications. Something seems to go in a sleep mode when there is no request for a longer time. It then takes 10-20 seconds for the site to load. Feels like there is something that has to wake up when there have been no requests for a longer time. How can I fix that? I have enough RAM so it should be no problem if whatever goes to sleep just stays awake. ;) 回答1: Take a look at the PassengerPoolIdleTime parameter for Passenger. It states the maximum

Setting environment variables for Phusion Passenger applications

为君一笑 提交于 2019-12-09 17:28:12
问题 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. 回答1: I know of two solutions. The first (documented here) is essentially the