以下のサイトを参考にしてCentOS7にRemineをインストールしました。
http://blog.redmine.jp/articles/3_4/install/centos/
https://www.yuulinux.tokyo/10056/
ApacheのVirtualHostで10000番ポートを設定しています。
/etc/httpd/conf.d/redmine.conf
Listen 10000 <VirtualHost *:10000> DocumentRoot /var/www/redmine/public <Directory "/var/www/redmine/public"> AllowOverride All Require all granted </Directory> </VirtualHost> <IfModule mod_passenger.c> PassengerRoot /usr/share/ruby/vendor_ruby/phusion_passenger/locations.ini PassengerDefaultRuby /usr/bin/ruby PassengerInstanceRegistryDir /var/run/passenger-instreg </IfModule>
Webサーバにアクセスしたところ、下のような画面が表示されてしまいました。
apacheのerror_logは以下のような出力がありました。
/etc/httpd/logs/error_log
App 32434 output: Error: The application encountered the following error: method `source' not defined in Gem::Specification (NameError) App 32434 output: /home/user/.gem/ruby/gems/bundler-2.1.4/lib/bundler/rubygems_ext.rb:17:in `remove_method' App 32434 output: /home/user/.gem/ruby/gems/bundler-2.1.4/lib/bundler/rubygems_ext.rb:17:in `<class:Specification>' App 32434 output: /home/user/.gem/ruby/gems/bundler-2.1.4/lib/bundler/rubygems_ext.rb:14:in `<module:Gem>' App 32434 output: /home/user/.gem/ruby/gems/bundler-2.1.4/lib/bundler/rubygems_ext.rb:13:in `<top (required)>' App 32434 output: /home/user/.gem/ruby/gems/bundler-2.1.4/lib/bundler.rb:10:in `require_relative' App 32434 output: /home/user/.gem/ruby/gems/bundler-2.1.4/lib/bundler.rb:10:in `<top (required)>' App 32434 output: /home/user/.gem/ruby/gems/bundler-2.1.4/lib/bundler/setup.rb:6:in `require_relative' App 32434 output: /home/user/.gem/ruby/gems/bundler-2.1.4/lib/bundler/setup.rb:6:in `<top (required)>' App 32434 output: /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require' App 32434 output: /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require' App 32434 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:363:in `activate_gem' App 32434 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:221:in `block in run_load_path_setup_code' App 32434 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:527:in `running_bundler' App 32434 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:220:in `run_load_path_setup_code' App 32434 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:91:in `preload_app' App 32434 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:189:in `block in <module:App>' App 32434 output: /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:380:in `run_block_and_record_step_progress' App 32434 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:188:in `<module:App>' App 32434 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>' App 32434 output: /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>' [ E 2020-03-24 18:15:14.4207 30785/Tu age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /var/www/redmine: The application encountered the following error: method `source' not defined in Gem::Specification (NameError) Error ID: 5727fbe8 Error details saved to: /tmp/passenger-error-VU8dM4.html [ E 2020-03-24 18:15:14.4280 30785/Tb age/Cor/Con/CheckoutSession.cpp:276 ]: [Client 2-2] Cannot checkout session because a spawning error occurred. The identifier of the error is 5727fbe8. Please see earlier logs for details about the error.
当方、Rubyにはそれほど明るくないので困っております。
passengerが正しく動作していないことは分かるのですが、それ以上のことは理解できませんでした。
何が原因なのでしょうか?
識者の方、ぜひお力をお貸し下さい。
よろしくお願いします。
補足情報
CentOS Linux release 7.7.1908 (Core)
MariaDB 10.4.12
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
Phusion Passenger 6.0.4
Redmine 4.1.0
追記
分かる限りでインストールした手順を説明致します。
基本的にRedmine.JP Blogにある手順を行いましたが、rubyはすでにインストールされていたものを使用しました(詳細不明)。
rubyのパスからすると、rbenvでインストールされているようです。
なお、SELinuxは無効化してあります。
$ sudo yum -y groupinstall "Development Tools" $ sudo yum -y install openssl-devel readline-devel zlib-devel curl-devel libyaml-devel libffi-devel $ sudo yum -y install httpd-devel $ sudo yum -y install ImageMagick ImageMagick-devel ipa-pgothic-fonts $ gem install bundler $ svn co https://svn.redmine.org/redmine/branches/4.1-stable/ /var/www/redmine $ cd /var/www/redmine $ bundle install --without development test --path vendor/bundle
passenger-install-apache2-moduleでいくつかのパッケージがインストールできませんでした。
そのため、sudoをつけroot権限で実行したところ、正常?に終了しました。
$ passenger-install-apache2-module --auto --languages ruby Welcome to the Phusion Passenger Apache 2 module installer, v6.0.4. 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. -------------------------------------------- Which languages are you interested in? Override selection with --languages. ‣ ⬢ Ruby ⬡ Python ⬡ Node.js ⬡ Meteor -------------------------------------------- Checking for required software... Package apr-1 was not found in the pkg-config search path. Perhaps you should add the directory containing `apr-1.pc' to the PKG_CONFIG_PATH environment variable No package 'apr-1' found cannot open /httpd/build/config_vars.mk: そのようなファイルやディレクトリはありません at /usr/bin/apxs line 214. Package apr-1 was not found in the pkg-config search path. Perhaps you should add the directory containing `apr-1.pc' to the PKG_CONFIG_PATH environment variable No package 'apr-1' found cannot open /httpd/build/config_vars.mk: そのようなファイルやディレクトリはありません at /usr/bin/apxs line 214. Package apr-1 was not found in the pkg-config search path. Perhaps you should add the directory containing `apr-1.pc' to the PKG_CONFIG_PATH environment variable No package 'apr-1' found cannot open /httpd/build/config_vars.mk: そのようなファイルやディレクトリはありません at /usr/bin/apxs line 214. Package apr-1 was not found in the pkg-config search path. Perhaps you should add the directory containing `apr-1.pc' to the PKG_CONFIG_PATH environment variable No package 'apr-1' found cannot open /httpd/build/config_vars.mk: そのようなファイルやディレクトリはありません at /usr/bin/apxs line 214. * Checking for C compiler... Found: yes Location: /home/linuxbrew/.linuxbrew/bin/cc * Checking for C++ compiler... Found: yes Location: /home/linuxbrew/.linuxbrew/bin/c++ * Checking for Curl development headers with SSL support... Found: yes curl-config location: /home/linuxbrew/.linuxbrew/bin/curl-config Header location: /home/linuxbrew/.linuxbrew/Cellar/curl/7.69.1/include/curl/curl.h Version: libcurl 7.69.1 Usable: yes Supports SSL: yes * Checking for Zlib development headers... Found: yes Location: /home/linuxbrew/.linuxbrew/include/zlib.h * Checking for Apache 2... Found: no * Checking for Rake (associated with /opt/rbenv/versions/2.6.0/bin/ruby)... Found: yes Location: /opt/rbenv/versions/2.6.0/bin/ruby /opt/rbenv/versions/2.6.0/bin/rake * Checking for OpenSSL support for Ruby... Found: yes * Checking for RubyGems... Found: yes * Checking for Ruby development headers... Found: yes Location: /opt/rbenv/versions/2.6.0/include/ruby-2.6.0/ruby.h * Checking for rack... Found: yes * Checking for OpenSSL development headers... Found: no * Checking for Apache 2 development headers... Found: yes Location of apxs2: /usr/bin/apxs * Checking for Apache Portable Runtime (APR) development headers... Found: no * Checking for Apache Portable Runtime Utility (APU) development headers... Found: no Some required software is not installed. But don't worry, this installer will tell you how to install them. Press Enter to continue, or Ctrl-C to abort. -------------------------------------------- Installation instructions for required software * To install Apache 2: Please install it with yum install httpd * To install OpenSSL development headers: Please install it with yum install openssl-devel * To install Apache Portable Runtime (APR) development headers: Please install it with yum install apr-devel * To install Apache Portable Runtime Utility (APU) development headers: Please install it with yum install apr-util-devel If the aforementioned instructions didn't solve your problem, then please take a look at our documentation for troubleshooting tips: https://www.phusionpassenger.com/library/install/apache/ https://www.phusionpassenger.com/library/admin/apache/troubleshooting/
$ sudo passenger-install-apache2-module --auto --languages ruby The Phusion Passenger Apache module is correctly installed :-) Press Enter to learn how to deploy a web app on Apache. -------------------------------------------- Deploying a web application To learn how to deploy a web app on Passenger, please follow the deployment guide: https://www.phusionpassenger.com/library/deploy/apache/deploy/ Enjoy Phusion Passenger, a product of Phusion® (www.phusion.nl) :-) https://www.phusionpassenger.com Passenger® is a registered trademark of Phusion Holding B.V.
この後、RedmineとApacheの設定を書き換えました。
回答1件
あなたの回答
tips
プレビュー