Question

I am having a lot of trouble getting a VPS - Ubuntu 10.10 / Apache2 / Passenger environment working.

I have setup a virtual host "rails.mydomain.com" with the following file:

<VirtualHost *:80>
    ServerName rails.mydomain.com
    DocumentRoot /var/www/vhosts/rails.mydomain.com/appname/public
    <Directory /var/www/vhosts/rails.mydomain.com/appname/public>
            Allow from all
            Options -MultiViews -Indexes
    </Directory>

    Include /etc/apache2/production-expires.conf
    CustomLog /var/log/apache2/rails.mydomain.com-access_log common
    ErrorLog /var/log/apache2/rails.mydomain.com-error_log
</VirtualHost>

When i try and load up the app on the server, i get:

Error message:
    cannot load such file -- rubygems/path_support

Exception class:
    LoadError

Application root:
    /var/www/vhosts/rails.mydomain.com/appname 

Also, if i try and go to any path inside, i get the same exact error... so like rails.mydomain.com/testpath, rails.mydomain.com/blog, etc etc

I have read some things about permissions on the ruby folder, how do i check these permissions (I am a developer trying to be a server admin, so any advice is appreciated!)

Was it helpful?

Solution

My problems were all around my ruby installation being NOT system-wide. It was installed for root, and apache couldn't access Ruby.

I reinstalled Ruby using sudo, following RVM's install guide for system-wide and all is good.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top