Multiple Passenger Installations - macos-big-sur

How can I find which passenger installation is bad and delete it? Passenger troubleshooting has resulted in a warning of multiple installations, but the feedback integrates both of them somehow. Latest versions on Big-Sur.
Passenger installation test:
* Checking whether this Passenger install is in PATH... ✓
* Checking whether there are no other Passenger installations... (!)
You are currently validating against Phusion Passenger 6.0.7, located in:
/opt/homebrew/Cellar/passenger/6.0.7_5/libexec/bin/passenger
Besides this Passenger installation, the following other
Passenger installations have also been detected:
/opt/homebrew/bin/passenger
Please uninstall these other Passenger installations to avoid
confusion or conflicts.
Detected 0 error(s), 1 warning(s).
~ ❯ which passenger
/opt/homebrew/bin/passenger
~ ❯ passenger -v
Phusion Passenger 6.0.7
~ ❯ brew info passenger
passenger: stable 6.0.7 (bottled), HEAD
Server for Ruby, Python, and Node.js apps via Apache/NGINX
https://www.phusionpassenger.com/
/opt/homebrew/Cellar/passenger/6.0.7_5 (4,567 files, 288.6MB) *
Poured from bottle on 2021-03-30 at 12:55:05
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/passenger.rb
License: MIT
==> Dependencies
Build: nginx ✔
Required: openssl#1.1 ✔, pcre ✔
==> Options
--HEAD
Install HEAD version
==> Caveats
To activate Phusion Passenger for Nginx, run:
brew install nginx
And add the following to /opt/homebrew/etc/nginx/nginx.conf at the top scope (outside http{}):
load_module /opt/homebrew/opt/passenger/libexec/modules/ngx_http_passenger_module.so;
And add the following to /opt/homebrew/etc/nginx/nginx.conf in the http scope:
passenger_root /opt/homebrew/opt/passenger/libexec/src/ruby_supportlib/phusion_passenger/locations.ini;
passenger_ruby /usr/bin/ruby;
To activate Phusion Passenger for Apache, create /etc/apache2/other/passenger.conf:
LoadModule passenger_module /opt/homebrew/opt/passenger/libexec/buildout/apache2/mod_passenger.so
PassengerRoot /opt/homebrew/opt/passenger/libexec/src/ruby_supportlib/phusion_passenger/locations.ini
PassengerDefaultRuby /usr/bin/ruby
==> Analytics
install: 593 (30 days), 1,494 (90 days), 6,255 (365 days)
install-on-request: 548 (30 days), 1,399 (90 days), 5,473 (365 days)
build-error: 0 (30 days)

Related

What's the right string to use when installing Ruby 3.1 through RVM on Mac OS Big Sur?

I’m using Mac OS Big Sur and rvm
$ rvm -v
rvm 1.29.12-next (master) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
I have version 2.7.5 of Ruby installed and would like to install version 3.1. I tried
$ rvm install 3.1
Unknown ruby string (do not know how to handle): ruby-3.1.
Unknown ruby string (do not know how to handle): ruby-3.1.
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/11.6/x86_64/ruby-3.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates bundle '/usr/local/etc/openssl#1.1/cert.pem' is already up to date.
Requirements installation successful.
Unknown ruby string (do not know how to handle): ruby-3.1.
Installing Ruby from source to: /Users/davea/.rvm/rubies/ruby-3.1, this may take a while depending on your cpu(s)...
Unknown ruby string (do not know how to handle): ruby-3.1.
ruby-3.1 - #downloading ruby-3.1, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404
The requested url does not exist(22): 'https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.tar.gz'
Checking fallback: https://ftp.ruby-lang.org/pub/ruby/3.1/ruby-3.1.tar.gz
No fallback URL could be found, try increasing timeout with:
echo "export rvm_max_time_flag=20" >> ~/.rvmrc
There has been an error fetching the ruby interpreter. Halting the installation.
When I visit the URL https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.tar.gz, I get the message
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Key>pub/ruby/3.1/ruby-3.1.tar.gz</Key>
<RequestId>8DG8HS5XNTY4XMG4</RequestId>
<HostId>mOBmNj3QbUmQtw61eviwWGXeG9PTNUYS9S6F+BmBGtWe4zscHGk8UBqYMnwP+rcpkywMq10QxLA=</HostId>
</Error>
Where do I get the key? The rvm info is below
$ rvm info
ruby-2.7.5#my-project:
system:
uname: "Darwin localhost 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64"
name: "OSX"
version: "11.6"
architecture: "x86_64"
bash: "/bin/bash => GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin20)"
zsh: "/bin/zsh => zsh 5.8 (x86_64-apple-darwin20.0)"
remote_path: "osx/11.6/x86_64"
xcode: "13.2.1"
rvm:
version: "1.29.12-next (master)"
updated: "2 months 22 hours 58 seconds ago"
path: "/Users/davea/.rvm"
autolibs: "[4] Allow RVM to use package manager if found, install missing dependencies, install package manager (only OS X)."
ruby:
interpreter: "ruby"
version: "2.7.5p203"
date: "2021-11-24"
platform: "x86_64-darwin20"
patchlevel: "2021-11-24 revision f69aeb8314"
full_version: "ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-darwin20]"
homes:
gem: "/Users/davea/.rvm/gems/ruby-2.7.5#my-project"
ruby: "/Users/davea/.rvm/rubies/ruby-2.7.5"
binaries:
ruby: "/Users/davea/.rvm/rubies/ruby-2.7.5/bin/ruby"
irb: "/Users/davea/.rvm/rubies/ruby-2.7.5/bin/irb"
gem: "/Users/davea/.rvm/rubies/ruby-2.7.5/bin/gem"
rake: "/Users/davea/.rvm/gems/ruby-2.7.5#my-project/bin/rake"
environment:
PATH: "/Users/davea/.rvm/gems/ruby-2.7.5#my-project/bin:/Users/davea/.rvm/gems/ruby-2.7.5#global/bin:/Users/davea/.rvm/rubies/ruby-2.7.5/bin:/Users/davea/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/davea/.cabal/bin:/Users/davea/.ghcup/bin:/Users/davea/.cabal/bin:/Users/davea/.ghcup/bin:/Users/davea/.cabal/bin:/Users/davea/.ghcup/bin"
GEM_HOME: "/Users/davea/.rvm/gems/ruby-2.7.5#my-project"
GEM_PATH: "/Users/davea/.rvm/gems/ruby-2.7.5#my-project:/Users/davea/.rvm/gems/ruby-2.7.5#global"
MY_RUBY_HOME: "/Users/davea/.rvm/rubies/ruby-2.7.5"
IRBRC: "/Users/davea/.rvm/rubies/ruby-2.7.5/.irbrc"
RUBYOPT: ""
gemset: "my-project"
> rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-head] # security released on head
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p330]
[ruby-]1.9.3[-p551]
[ruby-]2.0.0[-p648]
[ruby-]2.1[.10]
[ruby-]2.2[.10]
[ruby-]2.3[.8]
[ruby-]2.4[.10]
[ruby-]2.5[.8]
[ruby-]2.6[.6]
[ruby-]2.7[.2]
[ruby-]3[.0.0]
ruby-head
3.1 doesn't seem to be on the list, but to install it you would use:
> rvm install ruby-3.1.0
or
> rvm install 3.1.0
But again, doesn't seem available, at least in rvm stable or latest. Looking at GitHub, they have merged patches to add 3.1 support but the latest releases don't list it: https://github.com/rvm/rvm/releases.
You can install RVM head for now with rvm get head. Then rvm install 3.1 will work as expected.

How to find native extension gems installed in ./vendor/bundle with "bundle doctor"

We use a Docker image to run CI builds. The Docker image has a system-installed Ruby. The Docker container has the content of gem env and bundle env as indicated in the gist linked files:
[root#045ce9939883 code]# which ruby
/usr/local/bin/ruby
[root#045ce9939883 code]# ruby -v
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]
[root#045ce9939883 code]# bundle -v
Bundler version 2.0.2
We ran the following commands in the Docker container to install the gems at ./vendor/bundle:
bundle config --local path vendor/bundle
bundle install --jobs 5 --retry 3
We then tarred the entire directory, including ./vendor/bundle so that we can deploy the contents later using capistrano. On the deployment machines, we first untarred the tar file and then ran the cap deploy commands.
bundler on the deployment machines can't seem to locate gems which are built with native extensions in ./vendor/bundle. It seems to find all the other gems just fine:
[jenkins#tel-web-sob-r01-n01 2.1.10]$ bundle doctor
The following gems are missing
* nokogiri (1.10.9)
* nio4r (2.5.2)
* websocket-driver (0.7.2)
* bindex (0.5.0)
* byebug (9.0.6)
* puma (3.9.1)
* ffi (1.9.18)
Install missing gems with `bundle install
[jenkins#tel-web-sob-r01-n01 2.1.10]$ ls -l ./vendor/bundle/ruby/2.5.0/gems/ | grep nokogiri
drwxr-xr-x 7 jenkins jenkins 157 Jun 22 13:05 nokogiri-1.10.9
The deployment machine's gem env and bundle env contents are as linked
What I know so far:
I found that all the extensions are installed in ./vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0-static/. If I rename that directory to 2.5.0, it works.
Might be related to this issue.
The Dockerfile with which we are setting up ruby & bundler is similar to this one.
The machines where we deploy the bundled gems are RHEL machines and install ruby from the software collections repositories.
It seems like the deployment machines ruby is built with the --enable-shared=yes flag.
We changed our Dockerfile to configure the ruby build the same way, ./configure --enable-shared=yes. That solved our issue.

New Version of Phusion Passenger Not Used

After the update to OS X El Capitan, I've been trying to get my development environment to work again. My PHP sites are running, but I can't bring up my Ruby on Rails ones. The Phusion people recomended going to their latest version before offering any help. So I ran Brew upgrade passenger. I ran normally and exited with this message:
==> Summary
🍺 /usr/local/Cellar/passenger/5.0.24: 3,149 files, 140.4M
When I run passenger version, I get:
Phusion Passenger version 4.0.57
When I run which passenger, I get:
/Users/curt/.rbenv/shims/passenger
When I run rbenv which passenger, I get:
/Users/curt/.rbenv/versions/2.2.0/bin/passenger
When I run echo $PATH, I get:
/Users/curt/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
I've got to figure out why I had a duplicate /usr/local/bin.
When I run rbenv local where I've been running the other commands, I get 2.2.0.
I've done a rbenv rehash. Is there some step I've missed?
It turns out I have two copies of passenger: one I installed with brew and another I installed with gem. When I did "gem update passenger", passenger version returned the latest version.

How to completely uninstall phusion passenger in Ubuntu 13.10, Apache2 combination?

I installed the Phusion Passenger using the below commands
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
sudo apt-get install apt-transport-https ca-certificates
Then, because of some reason, I tried to uninstall Phusion Passenger by the following way,
First: I removed the all Phusion Passenger configuration directives
Than: gem uninstall passenger
(results: gem "passenger" is not installed)
If I put "passenger -v". It returns
Phusion Passenger version 4.0.37
"Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
Still it is not completely removed. I don't know how to proceed further.
I want to completely remove the Phusion Passenger, and install the fresh copy. Please assist me to do this
A friend had the same problem:
apt-get remove passenger gave "passenger is not installed"
gem uninstall passenger gave "passenger is not installed"
passenger -v shows it is installed
The reason is that she had installed passenger with Ruby 1.9.1 and since upgraded to Ruby 2.1.5. (note: rvm was not installed).
The answer is to gem1.9.1 uninstall passenger which prompts if you want to remove the gem and packages or just the gem.
should be able to run:
apt-get purge (I used passenger)
I hope this helps!

Ruby Not Detecting Gems

For some reason, Ruby can't seem to under stand that I installed the AppFog gem (af). When I run af, I get this:
/Users/myface13214/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find af (>= 0) amongst [Saikuro-1.1.0, actionmailer-3.2.8, actionpack-3.2.8, activemodel-3.2.8, activerecord-3.2.8, activeresource-3.2.8, activesupport-3.2.8, arel-3.0.2, awesome_print-1.1.0, bcrypt-ruby-3.0.1, bourbon-2.1.2, builder-3.0.4, cancan-1.6.8, capistrano-2.13.5, capybara-2.0.0, cgi_multipart_eof_fix-2.5.0, childprocess-0.3.6, chronic-0.3.0, chunky_png-1.2.6, churn-0.0.24, code_analyzer-0.3.0, coffee-rails-3.2.2, coffee-script-2.2.0, coffee-script-source-1.4.0, colored-1.2, compass-0.12.2, compass-rails-1.0.3, configatron-2.9.1, cover_me-1.2.0, daemons-1.1.9, daemons-1.0.10, devise-2.1.2, diff-lcs-1.1.3, erubis-2.7.0, excon-0.16.10, execjs-1.4.0, factory_girl-4.1.0, factory_girl_rails-4.1.0, fastthread-1.0.7, ffi-1.1.5, figaro-0.5.0, flay-1.4.3, flog-2.5.3, fssm-0.2.9, gem_plugin-0.2.3, hashie-1.2.0, highline-1.6.15, hike-1.2.1, hirb-0.7.0, i18n-0.6.1, journey-1.0.4, jquery-rails-2.1.3, json-1.7.5, json_pure-1.7.5, kgio-2.7.4, libwebsocket-0.1.6, mail-2.4.4, main-4.7.1, metric_fu-2.1.1, metrical-0.1.0, mime-types-1.19, mongrel-1.2.0.pre2, multi_json-1.3.7, net-scp-1.0.4, net-sftp-2.0.5, net-ssh-2.6.1, net-ssh-gateway-1.1.0, nokogiri-1.5.5, orm_adapter-0.4.0, polyglot-0.3.3, progressbar-0.11.0, rack-1.4.1, rack-cache-1.2, rack-ssl-1.3.2, rack-test-0.6.2, rails-3.2.8, rails_best_practices-1.12.0, railties-3.2.8, raindrops-0.10.0, rake-10.0.1, rcov-0.9.11, rdoc-3.12, reek-1.2.12, ripper_ruby_parser-0.0.8, roodi-2.1.0, rspec-core-2.12.0, rspec-expectations-2.12.0, rspec-mocks-2.12.0, rspec-rails-2.12.0, ruby2ruby-1.2.5, ruby_parser-2.3.1, rubyzip-0.9.9, sass-3.2.3, sass-rails-3.2.5, selenium-webdriver-2.26.0, sexp_processor-3.2.0, sprockets-2.1.3, sqlite3-1.3.6, syntax-1.0.0, thor-0.16.0, tilt-1.3.3, treetop-1.4.12, tzinfo-0.3.35, uglifier-1.3.0, unicorn-4.4.0, vcr-2.3.0, warden-1.2.1, websocket-1.0.2, xpath-1.0.0, yamler-0.1.0] (Gem::LoadError)
from /Users/myface13214/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /Users/myface13214/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
from /Users/myface13214/.rvm/gems/ruby-1.9.3-p327/bin/af:18:in `<main>'
from /Users/myface13214/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/myface13214/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `<main>'
This is even after installing it. For some reason gem install won't install it.
If it helps, I'm running 1.9.3 installed through RVM.
You didn't really show what you were using it with, so I am going to outline some troubleshooting and installation steps that I have used to install this. A clean gemset, the latest rvm, and recording it as I do it to post here.
The first thing you will want to confirm is your rvm environment. I did these two steps:
$: rvm get head
$: rvm use 1.9.3-p327
And then:
$: rvm info
which finally gives me this report:
ruby-1.9.3-p327#CleanProject:
system:
uname: "Linux lazurus 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:32:50 UTC 2012 i686 i686 i386 GNU/Linux"
system: "debian/wheezy_sid/i386"
bash: "/bin/bash => GNU bash, version 4.2.24(1)-release (i686-pc-linux-gnu)"
zsh: " => not installed"
rvm:
version: "rvm 1.16.20 (master) by Wayne E. Seguin <wayneeseguin#gmail.com>, Michal Papis <mpapis#gmail.com> [https://rvm.io/]"
updated: "13 minutes 59 seconds ago"
ruby:
interpreter: "ruby"
version: "1.9.3p327"
date: "2012-11-10"
platform: "i686-linux"
patchlevel: "2012-11-10 revision 37606"
full_version: "ruby 1.9.3p327 (2012-11-10 revision 37606) [i686-linux]"
homes:
gem: "/home/some_user/.rvm/gems/ruby-1.9.3-p327#CleanProject"
ruby: "/home/some_user/.rvm/rubies/ruby-1.9.3-p327"
binaries:
ruby: "/home/some_user/.rvm/rubies/ruby-1.9.3-p327/bin/ruby"
irb: "/home/some_user/.rvm/rubies/ruby-1.9.3-p327/bin/irb"
gem: "/home/some_user/.rvm/rubies/ruby-1.9.3-p327/bin/gem"
rake: "/home/some_user/.rvm/gems/ruby-1.9.3-p327#global/bin/rake"
environment:
PATH: "/home/some_user/.rvm/gems/ruby-1.9.3-p327#CleanProject/bin:/home/some_user/.rvm/gems/ruby-1.9.3-p327#global/bin:/home/some_user/.rvm/rubies/ruby-1.9.3-p327/bin:/home/some_user/.rvm/bin:/usr/local/heroku/bin:/home/some_user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-6-sun/bin"
GEM_HOME: "/home/some_user/.rvm/gems/ruby-1.9.3-p327#CleanProject"
GEM_PATH: "/home/some_user/.rvm/gems/ruby-1.9.3-p327#CleanProject:/home/some_user/.rvm/gems/ruby-1.9.3-p327#global"
MY_RUBY_HOME: "/home/some_user/.rvm/rubies/ruby-1.9.3-p327"
IRBRC: "/home/some_user/.rvm/rubies/ruby-1.9.3-p327/.irbrc"
RUBYOPT: ""
gemset: "CleanProject"
I have a clean gemset, no Gemfile so no bundle install. Simply this:
$: gem install af --no-rdoc --no-ri
Fetching: json_pure-1.6.7.gem (100%)
Fetching: rubyzip-0.9.9.gem (100%)
Fetching: mime-types-1.19.gem (100%)
Fetching: rest-client-1.6.7.gem (100%)
Fetching: terminal-table-1.4.5.gem (100%)
Fetching: interact-0.4.8.gem (100%)
Fetching: addressable-2.2.8.gem (100%)
Fetching: uuidtools-2.1.3.gem (100%)
Fetching: rb-readline-0.4.2.gem (100%)
Fetching: af-0.3.18.11.gem (100%)
Successfully installed json_pure-1.6.7
Successfully installed rubyzip-0.9.9
Successfully installed mime-types-1.19
Successfully installed rest-client-1.6.7
Successfully installed terminal-table-1.4.5
Successfully installed interact-0.4.8
Successfully installed addressable-2.2.8
Successfully installed uuidtools-2.1.3
Successfully installed rb-readline-0.4.2
Successfully installed af-0.3.18.11
10 gems installed
Then I check for the gems binary, so that I know it installs it.
$: which af
/home/some_user/.rvm/gems/ruby-1.9.3-p327#CleanProject/bin/af
And when I do an directory listing:
$: ls /home/some_user/.rvm/gems/ruby-1.9.3-p327#CleanProject/bin/
af
restclient
This is where it seems yours breaks...
$: af
Usage: af [options] command [<args>] [command_options]
Try 'af help [command]' or 'af help options' for more information.
And further, I can run the help option:
$: af help
I get the help screen
Usage: af [options] command [<args>] [command_options]
Try 'af help [command]' or 'af help options' for more information.
Currently available af commands are:
Getting Started
target [url] Reports current target or sets a new
|
| quite a few lines cut out for brevity's sake
|
Help
help [command] Get general help or help on a specific command
help options Get help on available options
Of course, when I check the folders that are reflected in the rvm info, I see the af binary alongside the others.
Sometimes rvm may not be fully engaged which means your $GEM_PATH environment variable is not set correctly. Typically rvm use 1.9.3 will fix that.
It may be that your rvm install is out of date or needs to be adjusted so that your default Ruby is set correctly.
please do the following, in the project root:
rvm use 1.9.3
rvm gemset create your-project-name
rvm gemset use your-project-name
bundle install
And see if everything s working as expected.

Resources