Not signed in (Sign In)
  1.  permalink
    HI All,
    This is my first setup on slicehost. I have an app that was previously working in two dev environments and a railsplayground shared hosting account. For slicehost I used nginx and Phusion Passenger. The install went well and nginx is working as expected. However, when I go to my rails app I get the following errors:

    These are the possible causes:

    *
    There may be a syntax error in the application's code. Please check for such errors and fix them.
    *
    A required library may not installed. Please install all libraries that this application requires.
    *
    The application may not be properly configured. Please check whether all configuration files are written correctly, fix any incorrect configurations, and restart this application.
    *
    A service that the application relies on (such as the database server or the Ferret search engine server) may not have been started. Please start that service.

    Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.

    Error message:
    Permission denied - /var/www/public_html/memorymap/config/environment.rb
    Exception class:
    Errno::EACCES
    Application root:
    /var/www/public_html/memorymap

    nginx is running as www-data and user www-data has full access to this file. I even tried changing it to 755 permissions and running nginx as root (I know this is a bad idea but just did it for testing). Any thoughts? Is there something I have to setup in Phusion for this? Any help would be greatly appreciated.
    thanks,
    Leo
  2.  permalink
    The URL to see the error is: http://leo.wasifu.com/events
  3.  permalink
    Problem solved. Found this explanation http://www.railsgarden.com/2008/04/12/configurating-passenger-mod_rails-on-slicehost-with-ubuntu-710/ (lok about 2/3 down page). Phusion will run as whichever user owns environment.rb. Since owner:groups was root:www-data it ran as root but didn't have access. Changed environment.rb to be owned by www-data and that fixed the problem