2

I want to install redmine on my PC. I worked with tutorials from http://redmine.org/ to deploy redmine on my PC. After installing ruby, additional packages and redmine, I want to configure apache2 for redmine. But have an issue after accessing to app:

Message from application: incompatible library version - /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri/nokogiri.so

I have installed ruby on rails via rvm:

oleg@oleg-VirtualBox ~ $ ruby -v
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
oleg@oleg-VirtualBox ~ $ rails -v
Rails 4.2.8

installed libapache2-mode-passenger with /etc/apache2/mods-available/passenger.conf config:

<IfModule mod_passenger.c>
  PassengerUserSwitching on 
  PassengerUser redmine
  PassengerGroup redmine
  PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
  PassengerDefaultRuby /usr/bin/ruby
</IfModule>

and config for redmine:

<VirtualHost *:80>
    DocumentRoot /var/www/html/redmine/
    ServerName redmine.local

    <Directory /var/www/html/redmine/>
        PassengerResolveSymlinksInDocumentRoot on
        AllowOverride all
        Options -MultiViews
        Options FollowSymLinks
        RailsBaseURI /redmine
    </Directory>
</VirtualHost>

Apache error log:

[ 2017-07-04 13:53:21.9413 1661/7f51d8495700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /opt/redmine/redmine: An error occurred while starting up the preloader.
  Error ID: 28c6ac21
  Error details saved to: /tmp/passenger-error-GYyEzF.html
  Message from application: incompatible library version - /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri/nokogiri.so (LoadError)
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:32:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:32:in `rescue in <top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:28:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie/inliner.rb:2:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie/inliner.rb:2:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie.rb:29:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie.rb:29:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `each'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `block in require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `each'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler.rb:108:in `require'
  /opt/redmine/redmine-3.3.4/config/application.rb:5:in `<top (required)>'
  /opt/redmine/redmine-3.3.4/config/environment.rb:2:in `require'
  /opt/redmine/redmine-3.3.4/config/environment.rb:2:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/rack-1.6.8/lib/rack/builder.rb:55:in `instance_eval'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/rack-1.6.8/lib/rack/builder.rb:55:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `eval'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `preload_app'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'


[ 2017-07-04 13:53:21.9466 1661/7f51d3fff700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 28c6ac21. Please see earlier logs for details about the error.

File nokogiri.so is present in folder.

If run rails server, redmine starts and works well.

Is anybody know how to fix problem?

  • @David so I assume that you have got rails setup fully and correctly – fosslinux Jul 28 '17 at 4:18
0
+100

I don't see which version of Ruby is being started by Passenger but I am suspicious you have a conflict between system Ruby (v2.3.1) and RVM Ruby (v2.3.3).

If you look at the output of ruby -v, you get ruby 2.3.1p112. But the log file you have posted has the following path: .../.rvm/gems/ruby-2.3.3/. So I think that running rails directly works because you use system gems, but when you run Passenger, it uses the system Ruby (per PassengerDefaultRuby), but somehow it attempts to load incompatible gems. I recommend backtracking your steps and choosing between system Ruby and RVM. In case you have followed some installation guide, please add it to your question.

If you would like to use the system Ruby, try removing /opt/rubymine/.rvm. If you have problem with dependencies then, you can install them using bundle install --deployment, so it will be contained in Rubymine's directory (see deployment mode). Make sure the user account under which is Passenger has read access to all files in /opt/redmine.

Alternatively you can instruct Passenger to use a different Ruby with Redmine using PasengerRuby configuration option, see https://www.phusionpassenger.com/library/deploy/apache/deploy/ruby/

0

Have you considered using Docker? I can see that you are running a VM, and if you are able to consider Docker I think you could greatly benefit.

What is docker

Docker is the world’s leading software container platform. Developers use Docker to eliminate “works on my machine” problems when collaborating on code with co-workers. Operators use Docker to run and manage apps side-by-side in isolated containers to get better compute density. Enterprises use Docker to build agile software delivery pipelines to ship new features faster, more securely and with confidence for both Linux and Windows Server apps.

Why would you use it?

It seems a bit complicated to get into, but it is fairly simple once you get the hang of it. It is mostly the building and architecture design of images/containers and services that is hard to get right at first, but if you just use the stock images provided by the communities around Docker you can get quite far.

I recently tried Redmine myself using only Docker because it is easier to keep a clean OS when you have these kinds of issues. I run Arch Linux on my main laptops and I often run into issues where old versions are phased out and not readily available from AUR.

The idea is that you fetch the Docker Redmine Image (or build your own), set up a docker-compose.yml OR run two commands: First start your SQL server, whichever it might be, and another to start the server running Redmine (docker run -d --name some-redmine redmine). These steps are documented on the page for the image.

Other things to note are how you handle persistent data, like the database, which varies on your setup. I am unsure of where my setup files are at this moment, but if I find them I will add them here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.