Skip to content

Commit

Permalink
Fix native extension compilation on Phusion Passenger Standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Oct 24, 2012
1 parent 4c51ff2 commit 811254c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/phusion_passenger/native_support.rb
Expand Up @@ -107,7 +107,7 @@ def load_from_home_dir
def compile_and_load
STDERR.puts "*** Phusion Passenger: no #{library_name} found for " +
"the current Ruby interpreter. Compiling one..."

require 'fileutils'
require 'phusion_passenger/platform_info/ruby'

Expand Down Expand Up @@ -163,6 +163,18 @@ def compile(target_dirs)
"trying a different directory..."
STDERR.puts "-------------------------------"
end
rescue Errno::ENOTDIR
# This can occur when PhusionPassenger.source_root
# is a location configuration file, and natively_packaged
# is set to false. For example, when we're running
# in Phusion Passenger Standalone. In this case
# just ignore this directory.
if i == target_dirs.size - 1
raise
else
STDERR.puts "Not a valid directory. Trying a different one..."
STDERR.puts "-------------------------------"
end
end
end
return result
Expand Down

0 comments on commit 811254c

Please sign in to comment.