Passenger loading error - unable to load such file - phusion_passenger (LoadError)

we have two applications on a virtual server running Apache (2.4.6) + Passenger + Rails 4.0.0.

we have a problem with our server caused by ruby ​​process consuming 100% CPU. After restarting the server, the ruby ​​process no longer works, but the passenger does not start.

Starting the passenger status we get the error:

/home/adm/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- phusion_passenger (LoadError)
from /home/adm/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/sbin/passenger-status:27:in `<main>'

      

I'm not that knowledgeable about passengers, so I have no idea what's going on.

Any suggestion? Even understand what the real problem is.

Thank you in advance

EDIT

running bundle show passenger

output Could not find gem passenger

PAssenger is loaded by apache into application virtual hosts:

<VirtualHost *:80>
        ServerName www.site1.it 
    ServerAlias site1.it       
    DocumentRoot /var/www/proj/current/public


    LoadModule passenger_module /home/adm/.rvm/gems/ruby-2.1.0@dentist/gems/passenger-4.0.37/buildout/apache2/mod_passenger.so
    <IfModule mod_passenger.c>
        PassengerRoot /home/adm/.rvm/gems/ruby-2.1.0@dentist/gems/passenger-4.0.37
        PassengerDefaultRuby /home/adm/.rvm/gems/ruby-2.1.0@dentist/wrappers/ruby
    </IfModule>

        RailsEnv production
        PassengerLogLevel 3
        PassengerMinInstances 1
        <Directory /var/www/proj/current/public>

                # This relaxes Apache security settings.
                AllowOverride all
                # MultiViews must be turned off.
                Options -MultiViews
        </Directory>
</VirtualHost>

<VirtualHost *:80>
        ServerName www.site2.it 
    ServerAlias site2.it       
    DocumentRoot /var/www/proj/current/public

    RequestHeader Set X-Sendfile-Type X-Sendfile
    XSendFile On

    LoadModule passenger_module /home/adm/.rvm/gems/ruby-2.1.0@police/gems/passenger-4.0.37/buildout/apache2/mod_passenger.so
    <IfModule mod_passenger.c>
          PassengerRoot /home/adm/.rvm/gems/ruby-2.1.0@police/gems/passenger-4.0.37
          PassengerDefaultRuby /home/adm/.rvm/gems/ruby-2.1.0@police/wrappers/ruby
        </IfModule>

        RailsEnv production
        PassengerLogLevel 3
        PassengerMinInstances 1
        <Directory /var/www/proj/current/public>

                # This relaxes Apache security settings.
                AllowOverride all
                # MultiViews must be turned off.
                Options -MultiViews
        </Directory>
</VirtualHost>

      

+3


source to share


2 answers


This is what I found in apache error.log

An error occurred while starting up the preloader: it did not write a startup response in time. Please read <a href="https://github.com/phusion/passenger/wiki/Debugging-application-startup-problems">this article</a> for more information about this problem.<br>

      



so I added PassengerStartTimeout 300 to my apache config file and it started working again even if very slow. The problem with the ruby ​​process persists, but I'll ask one more question.

0


source


I have the same problem but I am setting the passenger throw in Ubuntu

passenger-status

      



ERROR: Phusion Passenger is not working. If you are sure that it works, then the causes of this problem could be:

  1. You have configured the instance registry directory using the Apache PassengerInstanceRegistryDir parameter, the Nginx passenger_instance_registry_dir parameter, or the Phusion Passenger Standalone command line argument --instance-registry-dir. If so, please set the PASSENGER_INSTANCE_REGISTRY_DIR environment variable to that directory and run the passenger status again. 2. The instance directory was deleted by an operating system background service. Set a different instance registry directory using the Apache PassengerInstanceRegistryDir parameter, the Nginx passenger_instance_registry_dir parameter, or the Phusion Passenger Standalone command line argument --instance-registry-dir.
0


source







All Articles