Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save schowdhury/641190 to your computer and use it in GitHub Desktop.
Save schowdhury/641190 to your computer and use it in GitHub Desktop.
passenger3 standalone set environment variables rails3
Following this article:
http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/
This is a system level rvm install
rvm use 1.9.1
gem install passenger --pre
cd /webapps/fries.com
passenger start -a 127.0.0.1 -p 3000 -d
I have an environment variable in /etc/profile that sets LD_LIBRARY_PATH that doesn't get
set. I want to create a wrapper script around the passenger ruby that standalone passenger
calls which sources /etc/profile so LD_LIBRARY_PATH is set for my rails app. How can I
accomplish this?
As an aside I connect it to apache via reverse proxy
# Partial Apache configuration
<VirtualHost *:80>
ServerName www.fries.com
DocumentRoot /webapps/fries.com/public
PassengerEnabled off
ProxyPass / http://127.0.0.1:3000
ProxyPassReverse / http://127.0.0.1:3000
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment