Installation apache2.4 / passenger (redmine 2.5.1 on debian jessie)

Added by Michael Diederich over 3 years ago

I got the webrick running and then tried to install the apache2.4 / passenger / virtualhost. After checking the latest install I changed the database.yml adapter from mysql to mysql2

I installed all needed packages:

gem install mysql2
Building native extensions.  This could take a while...
Successfully installed mysql2-0.3.16
Parsing documentation for mysql2-0.3.16
Done installing documentation for mysql2 after 0 seconds
1 gem installed

gem install activerecord-mysql2-adapter
Successfully installed activerecord-mysql2-adapter-0.0.3
Parsing documentation for activerecord-mysql2-adapter-0.0.3
Done installing documentation for activerecord-mysql2-adapter after 0 seconds
1 gem installed

gem list mysql

*** LOCAL GEMS ***

activerecord-mysql2-adapter (0.0.3)
mysql (2.9.1, 2.8.2)
mysql2 (0.3.16, 0.3.15)

Right now I cannot even access the webrick anymore:

ruby script/rails server webrick -e production
=> Booting WEBrick
=> Rails 3.2.18 application starting in production on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (cannot load such file -- mysql2/mysql2) (LoadError)

Error in my browser when i try to access the apache / Passenger:

Web application could not be started
cannot load such file -- bundler/setup (LoadError)
  /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:245:in `block in run_load_path_setup_code'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:348:in `running_bundler'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:243:in `run_load_path_setup_code'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:100:in `preload_app'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:158:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `<main>'
Application root
/usr/share/redmine/
Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV and PASSENGER_ENV)
production
Ruby interpreter command
/usr/bin/ruby2.0
User and groups
uid=33(www-data) gid=33(www-data) groups=33(www-data)
Environment variables
APACHE_PID_FILE = /var/run/apache2/apache2.pid
SHELL = /bin/bash
APACHE_RUN_USER = www-data
PASSENGER_DEBUG_DIR = /tmp/passenger.spawn-debug.XXXXfpCgEZ
USER = www-data
APACHE_LOG_DIR = /var/log/apache2
PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD = /usr/share/redmine
APACHE_RUN_GROUP = www-data
LANG = C
SHLVL = 0
HOME = /var/www
LOGNAME = www-data
APACHE_LOCK_DIR = /var/lock/apache2
APACHE_RUN_DIR = /var/run/apache2
IN_PASSENGER = 1
PYTHONUNBUFFERED = 1
NODE_PATH = /usr/share/passenger/node
RAILS_ENV = production
RACK_ENV = production
WSGI_ENV = production
NODE_ENV = production
PASSENGER_APP_ENV = production
SERVER_PROTOCOL = HTTP/1.1
SERVER_ADDR = 127.0.0.1
REMOTE_ADDR = 127.0.0.1
REQUEST_URI = /
SERVER_PORT = 80
SERVER_NAME = test-redmine.DOMAIN.com
SERVER_SOFTWARE = Apache/2.4.9 (Debian)
SERVER_ADMIN = 
REMOTE_PORT = 60429
DOCUMENT_ROOT = /usr/share/redmine/public/
QUERY_STRING = 
REQUEST_METHOD = HEAD
Ulimits
Unknown
System memory usage
             total       used       free     shared    buffers     cached
Mem:          1003        865        137          9         20        333
-/+ buffers/cache:        511        492
Swap:          382         60        322
General Ruby interpreter information
RUBY_VERSION = 2.0.0
RUBY_PLATFORM = i386-linux-gnu
RUBY_ENGINE = ruby
RubyGems version = 2.0.14
Ruby configuration (RbConfig::CONFIG)
DESTDIR = 
MAJOR = 2
MINOR = 0
TEENY = 0
PATCHLEVEL = 457
INSTALL = /usr/bin/install -c
EXEEXT = 
prefix = /usr
ruby_install_name = ruby2.0
RUBY_INSTALL_NAME = ruby2.0
RUBY_SO_NAME = ruby-2.0
exec = exec
ruby_pc = ruby-2.0.pc
PACKAGE = ruby
BUILTIN_TRANSSRCS =  newline.c
USE_RUBYGEMS = YES
MANTYPE = doc
NROFF = /usr/bin/nroff
vendorarchhdrdir = /usr/include/i386-linux-gnu/ruby-2.0.0/vendor_ruby
sitearchhdrdir = /usr/include/i386-linux-gnu/ruby-2.0.0/site_ruby
rubyarchhdrdir = /usr/include/i386-linux-gnu/ruby-2.0.0
vendorhdrdir = /usr/include/ruby-2.0.0/vendor_ruby
sitehdrdir = /usr/include/ruby-2.0.0/site_ruby
rubyhdrdir = /usr/include/ruby-2.0.0
UNIVERSAL_INTS = 
UNIVERSAL_ARCHNAMES = 
configure_args =  '--build=i486-linux-gnu' '--prefix=/usr' '--includedir=/usr/include' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=/usr/lib/ruby2.0' '--disable-maintainer-mode' '--disable-dependency-tracking' '--enable-multiarch' '--target=i386-linux-gnu' '--program-suffix=2.0' '--with-soname=ruby-2.0' '--enable-shared' '--disable-rpath' '--with-baseruby=/usr/bin/ruby' '--with-sitedir=/usr/local/lib/site_ruby' '--with-sitearchdir=/usr/local/lib/i386-linux-gnu/site_ruby' '--enable-ipv6' '--with-dbm-type=gdbm_compat' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security' 'FFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4' 'GCJFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4' 'LDFLAGS=-Wl,-z,relro -L/build/ruby2.0-V_CXkO/ruby2.0-2.0.0.484+really457/debian/lib' '--with-tcltkversion=8.5' '--with-tclConfig-dir=/usr/lib/i386-linux-gnu/tcl8.5/tclConfig.sh' '--with-tkConfig-dir=/usr/lib/i386-linux-gnu/tk8.5/tkConfig.sh' '--with-tcllib=tcl8.5' '--with-tklib=tk8.5' '--with-tcl-include=/usr/include/tcl8.5' '--with-tk-include=/usr/include/tcl8.5' '--with-tcl-lib=/usr/lib/i386-linux-gnu' '--with-tk-lib=/usr/lib/i386-linux-gnu' 'build_alias=i486-linux-gnu' 'target_alias=i386-linux-gnu'
vendorarchdir = /usr/lib/i386-linux-gnu/ruby/vendor_ruby/2.0.0
vendorlibdir = /usr/lib/ruby/vendor_ruby/2.0.0
vendordir = /usr/lib/ruby/vendor_ruby
sitearchdir = /usr/local/lib/i386-linux-gnu/site_ruby
sitelibdir = /usr/local/lib/site_ruby/2.0.0
sitedir = /usr/local/lib/site_ruby
rubyarchdir = /usr/lib/i386-linux-gnu/ruby/2.0.0
rubylibdir = /usr/lib/ruby/2.0.0
ruby_version = 2.0.0
sitearch = i386-linux-gnu
arch = i386-linux-gnu
sitearchincludedir = /usr/include/i386-linux-gnu
archincludedir = /usr/include/i386-linux-gnu
sitearchlibdir = /usr/lib/i386-linux-gnu
archlibdir = /usr/lib/i386-linux-gnu
libdirname = archlibdir
RI_BASE_NAME = ri
ridir = /usr/share/ri
rubysitearchprefix = /usr/lib/i386-linux-gnu/ruby
rubyarchprefix = /usr/lib/i386-linux-gnu/ruby
rubylibprefix = /usr/lib/ruby
MAKEFILES = Makefile
PLATFORM_DIR = 
THREAD_MODEL = pthread
SYMBOL_PREFIX = 
EXPORT_PREFIX = 
COMMON_HEADERS = 
COMMON_MACROS = 
COMMON_LIBS = 
MAINLIBS = 
ENABLE_SHARED = yes
DLDLIBS =  -lc
SOLIBS = -lpthread -lrt -ldl -lcrypt -lm 
LIBRUBYARG_SHARED = -lruby-2.0
LIBRUBYARG_STATIC = -lruby-2.0-static
LIBRUBYARG = -lruby-2.0
LIBRUBY = libruby-2.0.so.2.0.0
LIBRUBY_ALIASES = libruby-2.0.so.2.0 libruby-2.0.so
LIBRUBY_SO = libruby-2.0.so.2.0.0
LIBRUBY_A = libruby-2.0-static.a
RUBYW_INSTALL_NAME = 
rubyw_install_name = 
LIBRUBY_DLDFLAGS = -Wl,-soname,libruby-2.0.so.2.0 
LIBRUBY_LDSHARED = gcc -shared
EXTDLDFLAGS = 
EXTLDFLAGS = 
strict_warnflags = -ansi -std=iso9899:199409
warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
debugflags = -ggdb3
optflags = -O3 -fno-fast-math
cxxflags =  -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
cflags =  -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
cppflags = 
NULLCMD = :
DLNOBJ = dln.o
INSTALLDOC = all
CAPITARGET = nodoc
RDOCTARGET = rdoc
DTRACE_GLOMMED_OBJ = 
DTRACE_OBJ = 
DTRACE_EXT = dmyh
EXECUTABLE_EXTS = 
ARCHFILE = 
LIBRUBY_RELATIVE = no
EXTOUT = .ext
RUNRUBY_COMMAND = $(MINIRUBY) $(srcdir)/tool/runruby.rb --extout=.ext $(RUNRUBYOPT)
PREP = miniruby
BTESTRUBY = $(MINIRUBY)
CROSS_COMPILING = no
TEST_RUNNABLE = yes
setup = Setup
EXTSTATIC = 
STRIP = strip -S -x
TRY_LINK = 
LIBPATHENV = LD_LIBRARY_PATH
RPATHFLAG = 
LIBPATHFLAG =  -L%s
LINK_SO = 
LIBEXT = a
DLEXT2 = 
DLEXT = so
LDSHAREDXX = g++ -shared
LDSHARED = gcc -shared
CCDLFLAGS = -fPIC
STATIC = 
ARCH_FLAG = 
DLDFLAGS = 
ALLOCA = 
codesign = 
POSTLINK = :
WERRORFLAG = -Werror
CHDIR = cd -P
RMALL = rm -fr
RMDIRS = rmdir --ignore-fail-on-non-empty -p
RMDIR = rmdir --ignore-fail-on-non-empty
CP = cp
RM = rm -f
PKG_CONFIG = pkg-config
PYTHON = 
DOXYGEN = 
DOT = 
DTRACE = 
MAKEDIRS = /bin/mkdir -p
MKDIR_P = /bin/mkdir -p
INSTALL_DATA = /usr/bin/install -c -m 644
INSTALL_SCRIPT = /usr/bin/install -c
INSTALL_PROGRAM = /usr/bin/install -c
SET_MAKE = 
LN_S = ln -s
NM = nm
DLLWRAP = 
WINDRES = 
OBJCOPY = :
OBJDUMP = objdump
ASFLAGS = 
AS = as
AR = ar
RANLIB = ranlib
try_header = 
COUTFLAG = -o 
OUTFLAG = -o 
CPPOUTFILE = -o conftest.i
GNU_LD = yes
LD = ld
GCC = yes
EGREP = /bin/grep -E
GREP = /bin/grep
CPP = gcc -E
CXXFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
CXX = g++
OBJEXT = o
CPPFLAGS = -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 
LDFLAGS = -L. -Wl,-z,relro -L/build/ruby2.0-V_CXkO/ruby2.0-2.0.0.484+really457/debian/lib -fstack-protector -rdynamic -Wl,-export-dynamic
CFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC
CC = gcc
NACL_SDK_VARIANT = 
NACL_SDK_ROOT = 
NACL_TOOLCHAIN = 
target_os = linux-gnu
target_vendor = pc
target_cpu = i386
target = i386-pc-linux-gnu
host_os = linux-gnu
host_vendor = pc
host_cpu = i486
host = i486-pc-linux-gnu
RUBY_VERSION_NAME = ruby-2.0.0
RUBYW_BASE_NAME = rubyw
RUBY_BASE_NAME = ruby
build_os = linux-gnu
build_vendor = pc
build_cpu = i486
build = i486-pc-linux-gnu
RUBY_RELEASE_DATE = 2014-03-03
RUBY_PROGRAM_VERSION = 2.0.0
target_alias = i386-linux-gnu
host_alias = 
build_alias = i486-linux-gnu
LIBS = -lpthread -lrt -ldl -lcrypt -lm 
ECHO_T = 
ECHO_N = -n
ECHO_C = 
DEFS = -D_FILE_OFFSET_BITS=64
mandir = /usr/share/man
localedir = /usr/share/locale
libdir = /usr/lib
psdir = /usr/share/doc/ruby
pdfdir = /usr/share/doc/ruby
dvidir = /usr/share/doc/ruby
htmldir = /usr/share/doc/ruby
infodir = /usr/share/info
docdir = /usr/share/doc/ruby
oldincludedir = /usr/include
includedir = /usr/include
localstatedir = /var
sharedstatedir = /usr/com
sysconfdir = /etc
datadir = /usr/share
datarootdir = /usr/share
libexecdir = /usr/lib/ruby2.0
sbindir = /usr/sbin
bindir = /usr/bin
program_transform_name = s&$&2.0&;s&^&&
exec_prefix = /usr
PACKAGE_URL = 
PACKAGE_BUGREPORT = 
PACKAGE_STRING = 
PACKAGE_VERSION = 
PACKAGE_TARNAME = 
PACKAGE_NAME = 
PATH_SEPARATOR = :
SHELL = /bin/bash
archdir = /usr/lib/i386-linux-gnu/ruby/2.0.0
topdir = /usr/lib/i386-linux-gnu/ruby/2.0.0
Ruby load path ($LOAD_PATH)
/usr/local/lib/site_ruby/2.0.0
/usr/local/lib/i386-linux-gnu/site_ruby
/usr/local/lib/site_ruby
/usr/lib/ruby/vendor_ruby/2.0.0
/usr/lib/i386-linux-gnu/ruby/vendor_ruby/2.0.0
/usr/lib/ruby/vendor_ruby
/usr/lib/ruby/2.0.0
/usr/lib/i386-linux-gnu/ruby/2.0.0
Ruby loaded libraries ($LOADED_FEATURES)
enumerator.so
/usr/lib/i386-linux-gnu/ruby/2.0.0/enc/encdb.so
/usr/lib/i386-linux-gnu/ruby/2.0.0/enc/trans/transdb.so
/usr/lib/i386-linux-gnu/ruby/2.0.0/rbconfig.rb
/usr/lib/ruby/2.0.0/rubygems/compatibility.rb
/usr/lib/ruby/2.0.0/rubygems/defaults.rb
/usr/lib/ruby/2.0.0/rubygems/deprecate.rb
/usr/lib/ruby/2.0.0/rubygems/errors.rb
/usr/lib/ruby/2.0.0/rubygems/version.rb
/usr/lib/ruby/2.0.0/rubygems/requirement.rb
/usr/lib/ruby/2.0.0/rubygems/platform.rb
/usr/lib/ruby/2.0.0/rubygems/specification.rb
/usr/lib/ruby/2.0.0/rubygems/exceptions.rb
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb
/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb
/usr/lib/ruby/2.0.0/thread.rb
/usr/lib/ruby/2.0.0/monitor.rb
/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb
/usr/lib/ruby/2.0.0/rubygems.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger.rb
/usr/lib/i386-linux-gnu/ruby/2.0.0/etc.so
/usr/lib/ruby/2.0.0/fileutils.rb
/usr/lib/ruby/2.0.0/tmpdir.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/utils/tmpio.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info/operating_system.rb
/usr/lib/ruby/2.0.0/rubygems/path_support.rb
/usr/lib/ruby/2.0.0/rubygems/dependency.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info/ruby.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info/binary_compatibility.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/constants.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/native_support.rb
/usr/lib/i386-linux-gnu/ruby/2.0.0/socket.so
/usr/lib/ruby/2.0.0/socket.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/ruby_core_enhancements.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/utils/tmpdir.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/preloader_shared_helpers.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/public_api.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/debug_logging.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb
/usr/lib/i386-linux-gnu/ruby/2.0.0/fcntl.so
/usr/lib/ruby/vendor_ruby/phusion_passenger/message_channel.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/message_client.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/utils/native_support_utils.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/utils/unseekable_socket.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb
/usr/lib/i386-linux-gnu/ruby/2.0.0/stringio.so
/usr/lib/ruby/vendor_ruby/phusion_passenger/utils/tee_input.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb
/usr/lib/ruby/vendor_ruby/phusion_passenger/analytics_logger.rb

Debian jessie / apache 2.4 / mysql 5.5
Thanks for help. I am want to setup a fresh install on a test server and late migrate my old 1.2.1 installation

Replies (2)

RE: Installation apache2.4 / passenger (redmine 2.5.1 on debian jessie) - Added by Martin Denizet (redmine.org team member) over 3 years ago

Hi Michael,
You need native dev headers to compile the gem:

apt-get install libmysqlclient-dev

Cheers,

RE: Installation apache2.4 / passenger (redmine 2.5.1 on debian jessie) - Added by Michael Diederich over 3 years ago

The package is already installed:

aptitude search libmysqlcli
i   libmysqlclient-dev                                - Entwicklungsdateien für die Datenbank MsQL                
v   libmysqlclient15-dev                              -
i   libmysqlclient16                                  - MySQL database client library
i A libmysqlclient18                                  - Clientbibliothek für die MySQL-Datenbank                  

Any other ideas?

(1-2/2)