Phusion passenger + uninitialised constant+ NameError

Hi,
I am installing the apache module in phusion passenger. I am facing the
error saying 'uninitialised constant.
I am attaching the screenshot of the error.

I am trying on Ubuntu machine.

Regards,
Shubhada

looks like the method “mktmpdir” is looking for a constant in the wrong
place, or from a library which hasn’t been required.
It’s looking under the namespace PhusionPassenger for FileUtils, whereas
that should probably be looking from the base:
require ‘fileutils’
::FileUtils

Am 12.07.2013 14:47, schrieb Shubhada S.:

Attachments:
http://www.ruby-forum.com/attachment/8597/passenger_error.jpg

Please copy & paste the error message into the email.
Having to open a browser in order to view a JPG image of
text(!) is annoying.

Hi,
Pasting the complete error message below:
Any help is appriciated.

Regards,
Shubhada

+++++++++++++++++++++++++++++++++++++++++++++++++++++

root@localhost:/usr/bin# passenger-install-apache2-module
Welcome to the Phusion Passenger Apache 2 module installer,
v4.0.8.[0m[37m[40m

This installer will guide you through the entire installation process.
It
shouldn’t take more than 3 minutes in total.

Here’s what you can expect from the installation process:

  1. The Apache 2 module will be installed for you.
  2. You’ll learn how to configure Apache.
  3. You’ll learn how to deploy a Ruby on Rails application.

Don’t worry if anything goes wrong. This installer will advise you on
how to
solve any problems.

Press Enter to continue, or Ctrl-C to abort.


Checking for required software…

Checking for GNU C compiler…[0m[37m[40m
Found: [1m[32myes[0m[37m[40m
Location: /usr/bin/gcc
Checking for GNU C++ compiler…[0m[37m[40m
Found: [1m[32myes[0m[37m[40m
Location: /usr/bin/g++
Checking for Curl development headers with SSL support…
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/utils/tmpio.rb:60:in
mktmpdir': uninitialized constant PhusionPassenger::Utils::FileUtils (NameError) from /usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/platform_info.rb:158:increate_temp_file’
from
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/platform_info/compiler.rb:134:in
find_header' from /usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/platform_info/depcheck_specs/libs.rb:30:inload’
from
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/platform_info/depcheck.rb:77:in
call' from /usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/platform_info/depcheck.rb:77:incheck’
from
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/platform_info/depcheck.rb:311:in
check_all' from /usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/platform_info/depcheck.rb:307:ineach’
from
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/platform_info/depcheck.rb:307:in
check_all' from /usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/abstract_installer.rb:129:incheck_dependencies’
from
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/bin/passenger-install-apache2-module:94:in
run_steps' from /usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/abstract_installer.rb:67:inrun’
from
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/bin/passenger-install-apache2-module:242
from /usr/bin/passenger-install-apache2-module:19:in `load’
from /usr/bin/passenger-install-apache2-module:19

Shubhada S. wrote in post #1115439:

Hi,
Pasting the complete error message below:
Any help is appriciated.

Regards,
Shubhada

+++++++++++++++++++++++++++++++++++++++++++++++++++++

root@localhost:/usr/bin# passenger-install-apache2-module
Welcome to the Phusion Passenger Apache 2 module installer,
v4.0.8.[0m[37m[40m

This installer will guide you through the entire installation process.
It
shouldn’t take more than 3 minutes in total.

Here’s what you can expect from the installation process:

  1. The Apache 2 module will be installed for you.
  2. You’ll learn how to configure Apache.
  3. You’ll learn how to deploy a Ruby on Rails application.

Don’t worry if anything goes wrong. This installer will advise you on
how to
solve any problems.

Press Enter to continue, or Ctrl-C to abort.


Checking for required software…

Checking for GNU C compiler…[0m[37m[40m
Found: [1m[32myes[0m[37m[40m
Location: /usr/bin/gcc
Checking for GNU C++ compiler…[0m[37m[40m
Found: [1m[32myes[0m[37m[40m
Location: /usr/bin/g++
Checking for Curl development headers with SSL support…

/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/utils/tmpio.rb:60:in

`mktmpdir’: uninitialized constant PhusionPassenger::Utils::FileUtils
(NameError)
from

/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/platform_info.rb:158:in

`create_temp_file’
from

/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/platform_info/compiler.rb:134:in

`find_header’
from

/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/platform_info/depcheck_specs/libs.rb:30:in

`load’
from

/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/platform_info/depcheck.rb:77:in

`call’
from

/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/platform_info/depcheck.rb:77:in

`check’
from

/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/platform_info/depcheck.rb:311:in

`check_all’
from

/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/platform_info/depcheck.rb:307:in

`each’
from

/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/platform_info/depcheck.rb:307:in

`check_all’
from

/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/abstract_installer.rb:129:in

`check_dependencies’
from

/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/bin/passenger-install-apache2-module:94:in

`run_steps’
from

/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/abstract_installer.rb:67:in

`run’
from

/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/bin/passenger-install-apache2-module:242

from /usr/bin/passenger-install-apache2-module:19:in `load’
from /usr/bin/passenger-install-apache2-module:19

Got the solution…
just added ‘require fileutils’ in
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.8/lib/phusion_passenger/utils/tmpio.rb