Hello,
I am new to Ruby and Rails and am trying to install passenger on a
computer using the Windows XP pro operating system. I have installed
Ruby 1.9.2 from
http://rubyinstaller.org/downloads and am trying to
use gems to install passenger. I encountered an error regarding the
need for a temporary directory where programs could be executed, so I
made a directory, set permissions to "Full Control" for
"Everyone" (removed all other permissions), set TMPDIR=C:\Ruby192\temp
and ran the installer again. I encountered the same error. This
surprised me because I could create and execute files in this
directory.
Poking around in C:\Ruby192\lib\ruby\gems\1.9.1\gems
\passenger-3.0.7\lib\phusion_passenger\platform_info.rb I found the
section of code where the noexec check was failing, and I added some
debug code. I thought perhaps that chmod was not setting the execute
permission since
http://www.ruby-doc.org/core/classes/File.html states
that "On non-Posix operating systems, there may be only the ability to
make a file read-only or read-write." So I had the program sleep for a
long time after creating the file so that I could manually ensure that
the executable permission/attribute was enabled. This still did not
make the File.executable? check return true. However, I found that if
the extension is set to .exe then this check passes.
Is there any reason that the following change should not be added to
avoid this problem for users on Windows (XP)?
basename = "test-exe.#{Process.pid}.#{Thread.current.object_id}"
becomes
basename = "test-exe.#{Process.pid}.#{Thread.current.object_id}.exe"
Perhaps I am completely misunderstanding something and there is a
simpler/better solution. However, my googling and RTFM'ing did not
enlighten me about this. Is this a question more relevant to a Ruby
language discussion forum rather than Passenger?
-Jacob
***************** Execution listing *****************
C:\Ruby192\temp>passenger-install-apache2-module
Welcome to the Phusion Passenger Apache 2 module installer, v3.0.7.
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...
--------------------------------------------
An error occurred
In order to run certain tests, this program must be able to write
temporary
executable files to some directory. However no such directory can be
found.
The following directories have been tried:
* C:\Ruby192\temp
This directory's filesystem is mounted with the 'noexec' option.
* C:/Ruby192/lib/ruby/gems/1.9.1/gems/passenger-3.0.7
This directory's filesystem is mounted with the 'noexec' option.
You can solve this problem by telling this program what directory to
write
temporary executable files to.
Set the $TMPDIR environment variable to the desired directory's
filename and
re-run this program.
Notes:
* If you're using 'sudo'/'rvmsudo', remember that 'sudo'/'rvmsudo'
unsets all
environment variables, so you must set the environment variable
*after*
having gained root privileges.
* The directory you choose must writeable and must not be mounted
with the
'noexec' option.
C:\Ruby192\temp>
***************** End of execution listing *****************