passenger

Getting Ruby on Rails to work with MAMP Pro

I've been looking for hours on how to get this to work but have still come up with nothing. Right now it's difficult because to run Phusion Passenger I need to have web sharing enabled (on my mac) but then I can't run MAMP PRO because it needs web sharing to be turned off for it to work. So I'm constantly going back and forth and turning...

Passenger Rack app 'cannot infer basepath'

I have a simple config.ru file for my Sinatra app. require 'sinatra' require 'app' run Sinatra::Application However, Passenger is failing with the error no such file to load -- app. I've tried using the 1.9 method require_relative but that now causes the error cannot infer basepath. I'm currently using the very hacky require File.jo...

VPS Passenger-Apache Ruby on Rails. Rails does not route via hostname, only IP...

Hi, I have just setup apache and passenger on a new VPS. It is the first time i've deployed a rails app. I've got it all working, it's just that when i refer to one of the routes defined in routes.rb using "www.hostname.com.au/controller/action" it just boots me to the index page of my rails app. If i use "ip.ip.ip.ip/controller/acti...

DataMapper fails to open database - sqlite3 - Apache, Passenger, Sinatra

I've got a Sinatra app which uses DataMapper to connect to an sqlite3 database. APP_ROOT = File.expand_path(File.dirname(__FILE__)) DataMapper::setup(:default, "sqlite3://#{APP_ROOT}/db.sqlite3") If I rackup the app and connect it works fine, no errors, and the db is created. However if I run the app through Passenger I get the error ...

Ruby on Rails application not regenerating stylesheets on deploy

I have a Ruby on Rails application that is not generating stylesheets properly. Sometimes SASS doesn't compile the SCSS into CSS and sometimes they concatenated CSS are not generated. I basically get an error writing the files, like this: Error Message: Errno::EACCES: Permission denied - /var/www/app/releases/20101004114929/public/style...

Rails/Passenger: no such file to load -- bundler

I have an application running an old version of Rails (2.2.2) and Passenger that I got up and running using Ruby Enterprise Edition 1.8.7. However, I soon found there were some incompatibilities between older versions of Rails and Ruby 1.8.7, and decided to downgrade to REE 1.8.6. However, now the application fails to start with a LoadEr...

Rails MultiSite App + nginx config

I'm trying to deploy a multisite Rails app with different views and public folders for each site. Let's say that we have www.foo.com and www.bar.com. Inside my RAILS_ROOT directory I have a [sites] directory with two folders inside [foo] and [bar] each folder consists of a [public] and [views] folder. My nginx configuration has to be so...

Problem With Routes After Deploying Sinatra Application

I wrote a simple Sinatra application with two "routes": "/show" and "/listshows". When I run the application on top of Webrick, everything works beautifully for both the static and non-static routes. Here are the URL's that I use: http://localhost:4567/listshows http://localhost:4567/show?guid=someguid Today, I deployed my simple ...

i'm using passenger with apache and it cannot find my locally installed gems

if i use ./script/server my app runs fine but when i try to it it through passenger on apache it gives me Missing the Rails 2.3.5 gem. if i vendorize rails it seems that it finds it but then it fails for missing gems even though they are in vendor/gems. ideally, i would not want to vendorize rails or gems for such a reason, but woul...

Ruby on Rails and RVM: Problem including external gems in my Gemfile (Rails 3)

When I try to include an external gem in my Gemfile (e.g. from github), my RVM doesn't recognize the external gem. It keeps telling me to run "bundle install" even after already doing. For example, when I log into shell and do a "bundle check", I see that all "dependencies are satisfied" but in my browser, Passenger tells me that my gem...

nginx be both reverse proxy and web server

I currently use nginx with passenger to serve my rails app. considering including a caching reverse proxy to the equation. Can I use the same instance of nginx as a reverse proxy (running on port 80, serving static as well as e-tagged actions) as well or would I need a different instance of nginx or a totally different type of reverse pr...

Paperclip error in rails3 on passenger

Rails3 on passenger. I have imagemagick installed and working correctly however I receive the following error when trying to add an image via paperclip. This works fine on in development, but not in production on passenger. [paperclip] An error was received while processing: #<Paperclip::PaperclipError: There was an error processing the...

Rails ActionController::InvalidAuthenticityToken All browsers

Hi, I'm having an issue with one user. No matter what he does he ends up getting throwing an ActionController::InvalidAuthenticityToken error. I have tried having him clear his browser's cache, cookies, etc. He gets this using both FireFox and Internet Explorer. I'm at a loss as to why this would be occurring for just him. Everythin...

Passenger does not recognize locally installed gem, works with packed gems

This is a production server. I have Passenger installed and it works properly for the most part. However, I always have to pack the gems with the projects. If I don't, I get this error message: Missing the Rails 2.3.8 gem. Please `gem install -v=2.3.8 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails v...

How to deploy multiple rails app on a single IP (Apache + Passenger)?

Hi, I want to deploy multiple rails app on a single server. If I had a domain name, I would have easily done that using subdomains as server name in virtual hosts. My problem is that I do not have a domain name. Can I do something like 70.42.89.11/app_1 as one server name and 70.42.89.11/app_2 as another. Or are there any other solu...

Multiple database.yml but one application

The Setup I have a Ruby on Rails application that I manage from a sysadmin perspective. This application in installed on a pool of load balanced application servers. These application servers a running Apache 2 and Passenger 3.0. The application files are stored in a ramdisk because IO on the application servers are ridiculously slow. ...

Where is the Phusion Passenger config file

Where is the apache module installed for Phusion Passenger. I want to adjust some of the config values here - http://www.modrails.com/documentation/Users%20guide%20Apache.html#_configuring_phusion_passenger and I don't know where this config file is. I've installed everything like this doc says for nginx. ...

Sqlite on a production box

Should I have to install sqlite on a prod box where I'm using mysql for a rails application? The reason I ask is that phusion is yelling at me with the following error: Could not find gem 'sqlite3-ruby (>= 0, runtime)' in any of the gem sources. (Bundler::GemNotFound) My gemfile has the following group :development, :test do gem...

Who can one separate static from dynamic requests with Nginx + Passenger

I would like to separate the request for static files from those handled by passenger. In Nginx one can log per "location" as far as I know, and that works fine for me. I have a global log and log per server. However I would also like to separate my logs based on request that are handled by passenger and those that are statically serve...

Passenger stalls with a large amount of simultaneous requests

I'm having trouble with one of our Rails 3 app's. When a lot of requests are sent to the server (10 / second) the whole server stalls. I tried a lot of different passenger setups and sometimes I noticed a slight improvement but none of them ended up to be a solution. My setup: Intel i7 (8 cores) 8GB ram Ubuntu 10.04 Server Ruby 1.9.2 ...