Ok so I tried using the scenario that the phusion blog wrote out but I am still getting a permission denied. I have a freshly installed ubuntu 11.10 system so now I am sure that whats going on is related to one install and not several different install attempts. SOOOO here is what I have.
Reference Tutorial: http://www.google.com/url?sa=D&q=http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/&usg=AFQjCNGMN5oWTn9Sf7yHwK33id7p7PJ-KQ The difference I did from this tutorial is that I wanted rails 1.9.2 to be the default since I won't be running any 1.8.7 apps. Install goes as follows: 1. Installed rvm (single user) -- For whatever reason when installed multi-user I was not able to load rvm into my terminal after logging in/out 2. Installed ruby 1.9.2 -- rvm install 1.9.2 3. Made 1.9.2 the default -- rvm --default use 1.9.2 4. Added the following to /etc/apache2/apache2.conf: LoadModule passenger_module /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/ gems/passenger-3.0.11/ext/apache2/mod_passenger.so PassengerRoot /home/vmcilwain/.rvm/gems/ruby-1.9.2-p290/gems/ passenger-3.0.11 PassengerRuby /home/vmcilwain/.rvm/wrappers/ruby-1.9.2-p290/ruby <VirtualHost *:80> ServerName vmcilwain-dell DocumentRoot /home/vmcilwain/sites/vell </VirtualHost> Unfortunately for some reason I am not able get to rubygems.org or github.com so I am not able to run bundle to get all of the necessary gems installed. I get the following error: Fetching source index for http://rubygems.org/ Fetching source index for http://github.com/ Could not reach rubygems repository http://rubygems.org/, http://github.com/ The weird thing is that I am able to ping both domains. Also when I create a brand new rails app bundle runs fine so I am curious about what it does not like about my Gemfile this time around that it had no problem with the last 5 times I have run it for that particular app. With the fresh rails app that I have just created I am not able to create the database using rake db create it is also giving me an error: vmcilwain@vmcilwain--D610:~/vell_new$ bundle exec rake db:create rake aborted! Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (See full trace by running task with --trace) I do have gem 'execjs' in my Gemfile so I am not sure exactly what I am doing wrong in this case either. On Dec 14, 2:35 pm, Jeff Lewis <[email protected]> wrote: > Hi Vell, > > Once you figure out that apache vhost path / read issue on your new > setup, .... > > If you're using passenger and you're running rvm, then you're likely > using (or will use) different rubies and/or gemsets for projects on a > given machine. If so, then you might want to consider using passenger- > standalone instead of passenger-apache-module: > > http://www.modrails.com/documentation/Users%20guide%20Standalone.html > > The main benefit of running passenger-standalone is that you can run > multiple projects that use diff rubies/gemsets from the same apache (/ > nginx/...). Here's an example setup from the phusion folks: > > http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-... > > I've been using passenger-standalone in production for over a year now > on a number of projects, and it works well. Those clients that use > passenger no longer use passenger-module and instead just use proxy'd > passenger-standalone for both their dev and prod envs. > > Here's an example of the setup on a local dev instance for a given rvm > passenger-standalone project where I typically maintain an rvm gemset > per project: > > ####### localhost subdomain for the proj: > $ cat /etc/hosts > ... > 127.0.0.1 foo.localhost > ... > > ###### vhost conf for the proj: > > $ cat /etc/apache2/sites-available/foo.conf > ####http://foo.localhost/ > <VirtualHost *:80> > ServerName foo.localhost > DocumentRoot /path/to/foo/public > <Directory /path/to/foo/public> > AllowOverride all > Options -MultiViews > </Directory> > > ProxyRequests Off > <Proxy *> > Order deny,allow > Deny from all > Allow from 127.0.0.1 > </Proxy> > ProxyPass /http://127.0.0.1:3044/ > ProxyPassReverse /http://127.0.0.1:3044/ > RewriteEngine On > RewriteCond %{LA-U:REMOTE_USER} (.+) > RewriteRule . - [E=RU:%1] > RequestHeader add X-Forwarded-User %{RU}e > ProxyPreserveHost on > > CustomLog /var/log/apache2/foo_access_log combined > ErrorLog /var/log/apache2/foo_error_log > > ErrorDocument 503 "<!DOCTYPE html><html><head><meta http- > equiv='Content-Type' content='text/html; charset=UTF-8' /><title>Foo > Service Is Temporarily Unavailable (503)</title></head><body><h2>Foo > Service Is Temporarily Unavailable (503)</h2><p>The Foo service is > temporarily unable to process your request due to maintenance > downtime.</p><p>Thanks for your patience. Please try again later.</p></ > body></html>" > > </VirtualHost> > > ###### I usually have a custom script to > ###### manage rails env server for proj: > > $ pwd > /path/to/foo > > $ cat ./script/foo_env_server.rb > ### > ### foo_env_server.rb is used to start/stop/restart/status the foo > env. > ### > ### Usage: $ ruby ./script/foo_env_server.rb ENV ACTION > ### ENV : development or production > ### ACTION : start, stop, restart or status > ### > ### Note: currently serving foo rails app using passenger-standalone > ### proxy'd via apache. > ### > > APP_NAME = "foo" > DEV_PORT = 3044 > PROD_PORT = 8044 > > PROJ_ROOT = File.expand_path("#{File.dirname(__FILE__)}/..") > DEV_ENV = "development" > PROD_ENV = "production" > ENVS = [ DEV_ENV, PROD_ENV ] > LOG_FNAMES = { DEV_ENV=>"#{PROJ_ROOT}/log/#{DEV_ENV}.log", > PROD_ENV=>"#{PROJ_ROOT}/log/#{PROD_ENV}.log" } > PID_FNAMES = { DEV_ENV=>"#{PROJ_ROOT}/tmp/pid/#{DEV_ENV}-passenger- > #{DEV_PORT}.pid", PROD_ENV=>"#{PROJ_ROOT}/tmp/pid/#{PROD_ENV}- > passenger-#{PROD_PORT}.pid" } > PORTS = { DEV_ENV=>DEV_PORT, PROD_ENV=>PROD_PORT } > ACTIONS = [ 'status', 'start', 'stop', 'restart' ] > ... > > def start(env) > port = PORTS[env] > pid_fname = PID_FNAMES[env] > log_fname = LOG_FNAMES[env] > ... > # start env server. > res = `passenger start --port #{port} --environment #{env} --log- > file #{log_fname} --pid-file #{pid_fname} --daemonize 2>&1`.strip > ... > end > ... > > $ rvm 1.9.2@foo && ruby ./script/foo_env_server.rb development restart > ... > foo development env on port 3044: started: pid = 26797 (saved to / > path/to/foo/tmp/pid/development-passenger-3044.pid) > > ###### test serving static content?: > > $ echo "hi from static foo" > ./public/foo.txt && curl > -sihttp://foo.localhost/foo.txt&& rm ./public/foo.txt > HTTP/1.1 200 OK > ... > hi from static foo > > ###### test serving dynamic content?: > > $ cat ./config/routes.rb > ... > match '/ping' => 'misc#ping', :via => [:get] > ... > > $ cat ./app/controllers/misc_controller.rb > ... > def ping > render(:text=>"1\n") > end > ... > > $ curl -sihttp://foo.localhost/ping > HTTP/1.1 200 OK > ... > 1 > > Another general benefit of this type of proxy'd setup is that if you > or your client decides they want to test / use a diff rails app server > for the proj, like unicorn or thin or ...., it's a lot easier to make > that switch (basically, stop curr env, install new gems as required, > mod ./script/foo_env_server.rb start call, start env, test, ....). > > Jeff > > On Dec 14, 10:51 am, Vell <[email protected]> wrote: > > > > > > > > > That is a very good catch. I will certainly make that change as well. > > I am at the point that I am also going to re-install ubuntu and start > > from scratch just to eliminate any other possibilities that might be > > happening behind the scenes. I will post my success of failure once I > > am done. > > > On Dec 14, 11:21 am, Frederick Cheung <[email protected]> > > wrote: > > > > On Dec 14, 3:15 pm, Vell <[email protected]> wrote: > > > > > DocumentRoot "/home/lmcilwain/vell/current/public" > > > > <Directory "/var/www/sites/vell/current/public"> > > > > The fact that these two paths don't match is suspicious to me. You'd > > > want both pointing at wherever it is on this that your app is. > > > > Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

