Code Monkey home page Code Monkey logo

Comments (27)

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From jballanc on April 11, 2008 21:59:47

I just ran into this issue as well. For me, changing variable name to APXS did not help. Moving the alternate bin
directory (/opt/local/apache2/bin on my system) to the front of the PATH in tcsh did fix the issue.

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From honglilai on April 12, 2008 00:51:55

Thanks for the report. We'll take a closer look after the weekend.

Cc: honglilai

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From honglilai on April 13, 2008 12:24:46

Could you run the following commands and tell me what you see?

ruby -rubygems -e 'gem "passenger"; require "passenger/platform_info"; puts
PlatformInfo::APXS2'
export APXS2=/path/to/your/apxs2
ruby -rubygems -e 'gem "passenger"; require "passenger/platform_info"; puts
PlatformInfo::APXS2'

Thanks.

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From iwarshak on April 13, 2008 14:21:26

For me, I got blank lines both times.

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From honglilai on April 13, 2008 14:43:55

What do you see if you run the following Ruby script?

require 'rubygems'
gem 'passenger'
require 'passenger/platform_info'
module PlatformInfo
puts "ENV['APXS2'] = #{ENV['APXS2'].inspect}"
puts "find_apxs2 -> #{find_apxs2.inspect}"
puts "env_defined?('APXS2') -> #{env_defined?('APXS2').inspect}"
end

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From iwarshak on April 13, 2008 18:54:35

Without setting APXS2 variable:

ENV['APXS2'] = nil
find_apxs2 -> "/usr/sbin/apxs"
env_defined?('APXS2') -> false

after setting APXS2 env var

ENV['APXS2'] = nil
find_apxs2 -> "/usr/sbin/apxs"
env_defined?('APXS2') -> false

after setting APXS env var

ENV['APXS2'] = "/Users/ian/Desktop/passenger-bin/bin/apxs"
find_apxs2 -> "/Users/ian/Desktop/passenger-bin/bin/apxs"
env_defined?('APXS2') -> true

Hope this helps.

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From iwarshak on April 13, 2008 19:21:09

WITH APXS2 set

ENV['APXS2'] = "/Users/ian/Desktop/passenger-bin/bin/apxs"
find_apxs2 -> "/Users/ian/Desktop/passenger-bin/bin/apxs"
env_defined?('APXS2') -> true

WITHOUT APXS2 set

ENV['APXS2'] = nil
find_apxs2 -> "/usr/sbin/apxs"
env_defined?('APXS2') -> false

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From jballanc on April 13, 2008 20:57:33

Switching to bash and running the commands also gave me two blank lines (this is using the default PATH, I
normally use tcsh, so I don't have bash configured for MacPorts, etc.).

Under tcsh I get the following

ruby -rubygems -e 'gem "passenger"; require "passenger/platform_info"; puts PlatformInfo::APXS2'
/usr/sbin/apxs
setenv APXS2 /opt/local/apache2/bin/apxs
/opt/local/apache2/bin/apxs
ruby -rubygems -e 'gem "passenger"; require "passenger/platform_info"; puts PlatformInfo::APXS2'

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From honglilai on April 14, 2008 01:40:30

iwarshak: How come that you get 2 different results when you set APXS2? Did you use a
different shell?

Which shell are you using, and which OS X version?

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From cianhughes on April 16, 2008 15:59:37

Just a thought here, might people be setting the variable as a non-root user, then running sudo passenger- install-apache2-module ?

Remember that sudo no longer passes environment variable through by default:
% export VAR=foo
% echo $VAR
foo
% sudo echo $VAR
nothing

All the best, loving passenger...

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From iwarshak on April 17, 2008 08:27:15

honglilai: Which test output are you referring to?

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From honglilai on April 17, 2008 14:25:39

iwarshak:

after setting APXS2 env var

ENV['APXS2'] = nil
find_apxs2 -> "/usr/sbin/apxs"
env_defined?('APXS2') -> false

vs

WITH APXS2 set

ENV['APXS2'] = "/Users/ian/Desktop/passenger-bin/bin/apxs"
find_apxs2 -> "/Users/ian/Desktop/passenger-bin/bin/apxs"
env_defined?('APXS2') -> true

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From iwarshak on April 17, 2008 14:34:33

honglilai:

I see. I must have mistakingly posted that twice. Here are my results again.

Without APXS or APXS2 set

ENV['APXS2'] = nil
find_apxs2 -> "/usr/sbin/apxs"
env_defined?('APXS2') -> false

WITH APXS set

ENV['APXS2'] = nil
find_apxs2 -> "/usr/sbin/apxs"
env_defined?('APXS2') -> false
=> nil

WITH APXS2 set

ENV['APXS2'] = "/Users/ian/Desktop/passenger-bin/bin/apxs"
find_apxs2 -> "/Users/ian/Desktop/passenger-bin/bin/apxs"
env_defined?('APXS2') -> true

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From honglilai on April 19, 2008 06:18:01

It seems that APXS2 is picked up just fine.

Could you show the exact commands that you typed while installing Passenger, as well
as the associated output?

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From honglilai on April 22, 2008 11:07:52

I can't reproduce this problem at all, on any Macs that I've tried. Can anyone else
reliably reproduce this?

Labels: NeedsConfirmation

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From jballanc on April 22, 2008 11:21:01

I just installed passenger on two different machines using BASH with no further issues. I think the issue I was
seeing was potentially due to either the quirks of that machine (PATH is a bit of a mess) or quirks in TCSH.

However, I would like to advocate for an alternative mechanisms for indicating non-standard Apache2
installs. For example something like:

sudo passenger-install-apache2-module --with-apxs2=/opt/local/apache2/bin/apxs

seems a bit more in keeping with the gem/mkmf model. Also, this would avoid the confusion of setting
variables and not having them passed to the sudo environment.

Either way, three machines and three successful installs later...THANK YOU!

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From honglilai on April 22, 2008 11:34:00

Summary: Commandline option should be provided to set apxs2's and apr-config's path (was: APXS variable needs to be set, not APXS2 (Mac OSX))
Labels: -Type-Defect -NeedsConfirmation Type-Enhancement

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From rowan.hick on April 30, 2008 13:33:55

CentOS5 64bit, couldn't install with default configuration, or setting the APXS as per the instructions. I had to
put in /usr/local/apache/bin/ in the path to get it to work.

Ruby 1.8.6, rubygems 0.9.4 (I think.. would have to go look), vanilla servers, this is on two different machines
behaving like this. Passenger 1.0.3.

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From honglilai on April 30, 2008 13:55:58

rowan.hick, could you show the exact commands that you typed to show that APXS2
didn't work?

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From johnny.rodgers on May 07, 2008 22:38:02

I'm attempting to install Passenger using MAMP as well. My PATH and APXS2 variables are:
PATH=/Users/Home/ruby-1.8.5/bin
APXS2=/Applications/MAMP/Library/bin/apxs

The gem installs fine, but I can't figure out how to set the variables above for the
root user, so that when I run passenger-install-apache2-module it will use the
correct Ruby and Apache installs.

When I run passenger-install-apache2-module as "Home", it starts up and picks the

correct Apache install:

Checking for required software...

  • GNU C++ compiler... found at /usr/bin/g++
  • Ruby development headers... found
  • OpenSSL support for Ruby... found
  • RubyGems... found
  • Rake... found at /usr/local/bin/rake
  • Apache 2... found at /Applications/MAMP/Library/bin/httpd
  • Apache 2 development headers... found at /Applications/MAMP/Library/bin/apxs
  • Apache Portable Runtime (APR) development headers... found at /usr/bin/apr-1-config

* fastthread... found


Permission problems

This installer must be able to write to the following directory:

/usr/local/lib/ruby/gems/1.8/gems/passenger-1.0.5

But it can't do that, because you're running the installer as Home.

Please re-run this installer as root.

But then when I run as root (sudo passenger-install-apache2-module), it does not
retrieve the same vars:


Checking for required software...

  • GNU C++ compiler... found at /usr/bin/g++
  • Ruby development headers... found
  • OpenSSL support for Ruby... found
  • RubyGems... found
  • Rake... found at /usr/local/bin/rake
  • Apache 2... found at /usr/sbin/httpd
  • Apache 2 development headers... found at /usr/sbin/apxs
  • Apache Portable Runtime (APR) development headers... found at
    /Developer/SDKs/MacOSX10.5.sdk/usr/bin/apr-1-config

* fastthread... found


Compiling and installing Apache 2 module...

I can see that my problem is what cianhughes pointed out above in comment 10. So how
do I set those two variables for the root user so that they are recognized by the
installer when it is run as root?

Thanks a lot for your help! Passenger looks great.

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From honglilai on May 08, 2008 00:40:59

johnny.rodgers:

sudo bash
passenger-install-apache2-module

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From johnny.rodgers on May 08, 2008 14:31:49

Thanks - however when I run that I get:

bash: passenger-install-apache2-module: command not found

Here is a transcript:

Macintosh-35:~ Home$ sudo bash
bash-3.2# echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
bash-3.2# export PATH=/Users/Home/ruby-1.8.5/bin
bash-3.2# echo $PATH
/Users/Home/ruby-1.8.5/bin
bash-3.2# echo $APXS2

bash-3.2# export APXS2=/Applications/MAMP/Library/bin/apxs
bash-3.2# echo $APXS2
/Applications/MAMP/Library/bin/apxs
bash-3.2# passenger-install-apache2-module
bash: passenger-install-apache2-module: command not found
bash-3.2#

If I run passenger-install-apache2-module immediately after sudo bash (without
exporting PATH and APXS2), I get the module installer, but with the default variables
rather than those exported. I realize that these aren't issues, but products of my
lack of knowledge with bash, but I haven't been able to find a clear answer anywhere
else, so I would really appreciate anything you can offer. Thanks again.

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From dmitry.sychov on June 08, 2009 05:24:03

i vote for

"sudo passenger-install-apache2-module --with-apxs2=/opt/local/apache2/bin/apxs"

passenger-install-apache2-module make a wrong guess about my apache path.

I have 2 apache servers in 2 separate directories. it picks up one
with APR 0.9 but should another with APR 1.x

and i should load the module into another one two. this is a total mess.

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From dmitry.sychov on June 08, 2009 06:04:40

ok the workaround is to update the PATH env var, just before running the script:

PATH=/your/path/to/apache/bin:$PATH && export PATH

the installer script will correctly bind with all headers then.

hope it will help someone..

gee!

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From honglilai on August 26, 2009 05:42:20

Labels: Milestone-2.2.6

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From honglilai on November 17, 2009 11:14:34

Fixed in commit 50750b1.

from passenger.

FooBarWidget avatar FooBarWidget commented on May 24, 2024

From honglilai on November 17, 2009 11:14:54

Status: Fixed

from passenger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.