1. 概要
また、エラーになっちゃいました。
本ページは、下記のサイトを参考にさせていただきました。
「passenger を利用していてログに passenger_native_support.so がどうの...」
2. 現象
いつものように、「Redmine」がエラーになります・・・。
「passenger」ログを見ると。
(各行のヘッダ部分は省略)
App 23597 output: [passenger_native_support.so] trying to compile for the current user (nobody) and Ruby interpreter...
App 23597 output: (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
App 23597 output: Warning: compilation didn't succeed. To learn why, read this file:
App 23597 output: /tmp/passenger_native_support-1m5bjar.log
App 23597 output: [passenger_native_support.so] finding downloads for the current Ruby interpreter...
App 23597 output: (set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)
App 23597 output: Could not download https://github.com/phusion/passenger/releases/download/release-6.0.23/rubyext-ruby-3.2.6-x86_64-freebsd.tar.gz: no download tool found (curl or wget required)
・・・ 略 ・・・
App 23597 output: /usr/local/lib/ruby/gems/3.2/gems/passenger/src/helper-scripts/rack-preloader.rb:29:in '<main>'
[ E 2024-11-29 11:01:40.7245 20742/T1f age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /usr/local/www/redmine: The application encountered the following error: undefined method 'email_delivery=' for ActionMailer::Base:Class (NoMethodError)
Error ID: a481e1b9
Error details saved to: /tmp/passenger-error-Gf6KpW.html
[ E 2024-11-29 11:01:40.7270 20742/Tf age/Cor/Con/CheckoutSession.cpp:284 ]: [Client 4-1] Cannot checkout session because a spawning error occurred. The identifier of the error is a481e1b9. Please see earlier logs for details about the error.
ログが出ているというので「/tmp/passenger-error-Gf6KpW.html」を読むと(抜粋)。
[passenger_native_support.so] trying to compile for the current user (nobody) and Ruby interpreter...
(set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
Warning: compilation didn't succeed. To learn why, read this file:
/tmp/passenger_native_support-1m5bjar.log
と書いちょる。
回りくどいわねぇ。
「/tmp/passenger_native_support-1m5bjar.log」を読むと。
# current user is: nobody
# mkdir -p /usr/local/lib/ruby/gems/3.2/gems/passenger/buildout/ruby/ruby-3.2.6-x86_64-freebsd
Encountered permission error, trying a different directory...
-------------------------------
# mkdir -p /nonexistent/.passenger/native_support/6.0.23/ruby-3.2.6-x86_64-freebsd
Encountered permission error, but no more directories to try. Giving up.
-------------------------------
なんか、「Redmine」が自身で、モジュールをビルドしようとして、パーミッションの問題でエラーになっちょるようです。
3. 対策
参考サイトに習って、好きにさせてやることにしました。
わたしの環境のログには。
# current user is: nobody
と出ているので(これは、後で変えることになりそう)。
「root」ユーザ権限で。
mkdir -pv /nonexistent/.passenger
chown -R nobody:nobody /nonexistent/.passenger
これで動くようになりました。
動作するようになった後で、「/nonexistent/.passenger」を見ると。
/nonexistent/.passenger
`-- native_support
`-- 6.0.23
`-- ruby-3.2.6-x86_64-freebsd
|-- Makefile
|-- mkmf.log
|-- passenger_native_support.o
`-- passenger_native_support.so
てなことになっておりました。