Web application could not be started cpanel - ruby-on-rails

I'm installing a rails app on cpanel hosting. I installed Ruby on Rails from Feature Manager in WHM.
Also enabled ruby24-mod_passenger from Easy Apache 4 (in WHM)
Then i added App in Application Manager (in Cpanel)
when i visit from url i saw these error.
I can't find how to solve this.
Error:
Web application could not be started
Error ID:
7e818f32
Details:
cannot load such file -- bundler/setup (LoadError)
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/loader_shared_helpers.rb:430:in `activate_gem'
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/loader_shared_helpers.rb:297:in `block in run_load_path_setup_code'
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/loader_shared_helpers.rb:435:in `running_bundler'
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/loader_shared_helpers.rb:296:in `run_load_path_setup_code'
/opt/cpanel/ea-ruby24/root/usr/share/passenger/helper-scripts/rack-preloader.rb:100:in `preload_app'
/opt/cpanel/ea-ruby24/root/usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
/opt/cpanel/ea-ruby24/root/usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/opt/cpanel/ea-ruby24/root/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'
System information:
Application root
/home/referr12/landing1
Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV, NODE_ENV and PASSENGER_APP_ENV)
development
Ruby interpreter command
/opt/cpanel/ea-ruby24/root/usr/libexec/passenger-ruby24
User and groups
uid=1000(referr12) gid=1002(referr12) groups=1002(referr12)
Environment variables
MANPATH = /opt/cpanel/ea-ruby24/root/usr/share/man:
HOSTNAME = vps36248.inmotionhosting.com
SHELL = /bin/bash
UNIQUE_ID = Wm7CSit77Nsu4dwPXX6OrAAAAEA
HISTSIZE = 40000
PERL5LIB = /home/referr12/perl5/lib/perl5:
PYTHONUNBUFFERED = 1
RACK_BASE_URI = /landing
PASSENGER_DEBUG_DIR = /tmp/passenger.spawn-debug.XXXXwf1RYv
PERL_MB_OPT = --install_base /home/referr12/perl5
X_SCLS = ea-ruby24
USER = referr12
LD_LIBRARY_PATH = /opt/cpanel/ea-ruby24/root/usr/lib64
LS_COLORS =
RAILS_RELATIVE_URL_ROOT = /landing
IN_PASSENGER = 1
RACK_ENV = development
PASSENGER_USE_FEEDBACK_FD = true
PATH = /opt/cpanel/ea-ruby24/root/usr/bin:/opt/cpanel/ea-ruby24/root/usr/sbin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/jdk/bin:/home/referr12/perl5/bin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin:/opt/cpanel/composer/bin:/usr/local/bin:/usr/X11R6/bin:/home/referr12/.local/bin:/home/referr12/bin
MAIL = /var/spool/mail/referr12
WSGI_ENV = development
PWD = /home/referr12/landing1
INPUTRC = /etc/inputrc
JAVA_HOME = /usr/local/jdk
EDITOR = pico
LANG = en_US.UTF-8
NODE_PATH = /opt/cpanel/ea-ruby24/root/usr/share/passenger/node
TZ = America/Los_Angeles
NODE_ENV = development
SHLVL = 3
HOME = /home/referr12
RAILS_ENV = development
LS_OPTIONS = --color=tty -F -a -b -T 0
PERL_LOCAL_LIB_ROOT = :/home/referr12/perl5
SERVER_SOFTWARE = Apache/2.4.29 (cPanel) OpenSSL/1.0.2n mod_bwlimited/1.4 Phusion_Passenger/5.1.8
LOGNAME = referr12
VISUAL = pico
XDG_DATA_DIRS = /opt/cpanel/ea-ruby24/root/usr/share:/usr/local/share:/usr/share
CLASSPATH = .:/usr/local/jdk/lib/classes.zip
PKG_CONFIG_PATH = /opt/cpanel/ea-ruby24/root/usr/lib64/pkgconfig
LESSOPEN = ||/usr/bin/lesspipe.sh %s
PASSENGER_APP_ENV = development
RESTARTSRV = 1
HISTTIMEFORMAT = (%m/%d/%y) %T
PERL_MM_OPT = INSTALL_BASE=/home/referr12/perl5
PASSENGER_BASE_URI = /landing
_ = /opt/cpanel/ea-ruby24/root/usr/bin/ruby
Ulimits
Unknown
System metrics
------------- General -------------
Kernel version : 3.10.0-042stab127.2
Uptime : 1d 13h 33m 29s
Load averages : 0.19%, 0.10%, 0.02%
Fork rate : unknown
General Ruby interpreter information
RUBY_VERSION = 2.4.2
RUBY_PLATFORM = x86_64-linux
RUBY_ENGINE = ruby
RubyGems version = 2.6.13
RubyGems paths = ["/home/referr12/.gem/ruby", "/opt/cpanel/ea-ruby24/root/usr/share/gems", "/opt/cpanel/ea-ruby24/root/usr/local/share/gems"]
Ruby configuration (RbConfig::CONFIG)
DESTDIR =
MAJOR = 2
MINOR = 4
TEENY = 2
PATCHLEVEL = 198
INSTALL = /bin/install -c
EXEEXT =
prefix = /opt/cpanel/ea-ruby24/root/usr
ruby_install_name = ruby
RUBY_INSTALL_NAME = ruby
RUBY_SO_NAME = ruby
exec = exec
ruby_pc = ruby.pc
PACKAGE = ruby
BUILTIN_TRANSSRCS = enc/trans/newline.c
USE_RUBYGEMS = YES
MANTYPE = doc
NROFF = /usr/bin/nroff
OPTIONAL_PRELUDES = ./abrt_prelude.rb
vendorarchhdrdir = /opt/cpanel/ea-ruby24/root/usr/include/vendor_ruby/x86_64-linux
sitearchhdrdir = /opt/cpanel/ea-ruby24/root/usr/include/site_ruby/x86_64-linux
rubyarchhdrdir = /opt/cpanel/ea-ruby24/root/usr/include
vendorhdrdir = /opt/cpanel/ea-ruby24/root/usr/include/vendor_ruby
sitehdrdir = /opt/cpanel/ea-ruby24/root/usr/include/site_ruby
rubyhdrdir = /opt/cpanel/ea-ruby24/root/usr/include
RUBY_SEARCH_PATH =
UNIVERSAL_INTS =
UNIVERSAL_ARCHNAMES =
configure_args = '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/opt/cpanel/ea-ruby24/root/usr' '--exec-prefix=/opt/cpanel/ea-ruby24/root/usr' '--bindir=/opt/cpanel/ea-ruby24/root/usr/bin' '--sbindir=/opt/cpanel/ea-ruby24/root/usr/sbin' '--sysconfdir=/opt/cpanel/ea-ruby24/root/etc' '--datadir=/opt/cpanel/ea-ruby24/root/usr/share' '--includedir=/opt/cpanel/ea-ruby24/root/usr/include' '--libdir=/opt/cpanel/ea-ruby24/root/usr/lib64' '--libexecdir=/opt/cpanel/ea-ruby24/root/usr/libexec' '--localstatedir=/opt/cpanel/ea-ruby24/root/usr/var' '--sharedstatedir=/opt/cpanel/ea-ruby24/root/usr/com' '--mandir=/opt/cpanel/ea-ruby24/root/usr/share/man' '--infodir=/opt/cpanel/ea-ruby24/root/usr/share/info' '--with-rubylibprefix=/opt/cpanel/ea-ruby24/root/usr/share/ruby' '--with-archlibdir=/opt/cpanel/ea-ruby24/root/usr/lib64' '--with-rubyarchprefix=/opt/cpanel/ea-ruby24/root/usr/lib64/ruby' '--with-sitedir=/opt/cpanel/ea-ruby24/root/usr/local/share/ruby/site_ruby' '--with-sitearchdir=/opt/cpanel/ea-ruby24/root/usr/local/lib64/ruby/site_ruby' '--with-vendordir=/opt/cpanel/ea-ruby24/root/usr/share/ruby/vendor_ruby' '--with-vendorarchdir=/opt/cpanel/ea-ruby24/root/usr/lib64/ruby/vendor_ruby' '--with-rubyhdrdir=/opt/cpanel/ea-ruby24/root/usr/include' '--with-rubyarchhdrdir=/opt/cpanel/ea-ruby24/root/usr/include' '--with-sitearchhdrdir=$(sitehdrdir)/$(arch)' '--with-vendorarchhdrdir=$(vendorhdrdir)/$(arch)' '--with-rubygemsdir=/opt/cpanel/ea-ruby24/root/usr/share/rubygems' '--with-ruby-pc=ruby.pc' '--with-compress-debug-sections=no' '--disable-rpath' '--enable-shared' '--with-ruby-version=' '--enable-multiarch' '--with-prelude=./abrt_prelude.rb' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro ' 'CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic'
CONFIGURE = configure
rubygemsdir = /opt/cpanel/ea-ruby24/root/usr/share/rubygems
vendorarchdir = /opt/cpanel/ea-ruby24/root/usr/lib64/ruby/vendor_ruby
vendorlibdir = /opt/cpanel/ea-ruby24/root/usr/share/ruby/vendor_ruby
vendordir = /opt/cpanel/ea-ruby24/root/usr/share/ruby/vendor_ruby
sitearchdir = /opt/cpanel/ea-ruby24/root/usr/local/lib64/ruby/site_ruby
sitelibdir = /opt/cpanel/ea-ruby24/root/usr/local/share/ruby/site_ruby
sitedir = /opt/cpanel/ea-ruby24/root/usr/local/share/ruby/site_ruby
rubyarchdir = /opt/cpanel/ea-ruby24/root/usr/lib64/ruby
rubylibdir = /opt/cpanel/ea-ruby24/root/usr/share/ruby
ruby_version_dir_name =
ruby_version = 2.4.0
sitearch = x86_64-linux
arch = x86_64-linux
sitearchincludedir = /opt/cpanel/ea-ruby24/root/usr/include/x86_64-linux
archincludedir = /opt/cpanel/ea-ruby24/root/usr/include/x86_64-linux
sitearchlibdir = /opt/cpanel/ea-ruby24/root/usr/lib64/x86_64-linux
archlibdir = /opt/cpanel/ea-ruby24/root/usr/lib64
libdirname = archlibdir
RUBY_EXEC_PREFIX = /opt/cpanel/ea-ruby24/root/usr
RUBY_LIB_VERSION = 2.4.0
RUBY_LIB_VERSION_STYLE = 3 /* full */
RI_BASE_NAME = ri
ridir = /opt/cpanel/ea-ruby24/root/usr/share/ri
rubysitearchprefix = /opt/cpanel/ea-ruby24/root/usr/lib64/x86_64-linux/ruby
rubyarchprefix = /opt/cpanel/ea-ruby24/root/usr/lib64/ruby
MAKEFILES = Makefile GNUmakefile
PLATFORM_DIR =
THREAD_MODEL = pthread
SYMBOL_PREFIX =
EXPORT_PREFIX =
COMMON_HEADERS =
COMMON_MACROS =
COMMON_LIBS =
MAINLIBS =
ENABLE_SHARED = yes
DLDLIBS = -lc
SOLIBS = -lpthread -ldl -lcrypt -lm
LIBRUBYARG_SHARED = -lruby
LIBRUBYARG_STATIC = -lruby-static
LIBRUBYARG = -lruby
LIBRUBY = libruby.so.2.4.2
LIBRUBY_ALIASES = libruby.so.2.4 libruby.so
LIBRUBY_SO = libruby.so.2.4.2
LIBRUBY_A = libruby-static.a
RUBYW_INSTALL_NAME =
rubyw_install_name =
EXTDLDFLAGS =
EXTLDFLAGS =
strict_warnflags = -std=gnu99
warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format
debugflags = -ggdb3
optflags = -O3 -fno-fast-math
NULLCMD = :
DLNOBJ = dln.o
INSTALL_STATIC_LIBRARY = no
EXECUTABLE_EXTS =
ARCHFILE =
LIBRUBY_RELATIVE = no
EXTOUT = .ext
PREP = miniruby
CROSS_COMPILING = no
TEST_RUNNABLE = yes
rubylibprefix = /opt/cpanel/ea-ruby24/root/usr/share/ruby
setup = Setup
ENCSTATIC =
EXTSTATIC =
STRIP = strip -S -x
TRY_LINK =
PRELOADENV = LD_PRELOAD
LIBPATHENV = LD_LIBRARY_PATH
RPATHFLAG =
LIBPATHFLAG = -L%s
LINK_SO =
ASMEXT = S
LIBEXT = a
DLEXT2 =
DLEXT = so
LDSHAREDXX = g++ -shared
LDSHARED = gcc -shared
CCDLFLAGS = -fPIC
STATIC =
ARCH_FLAG = -m64
DLDFLAGS = -Wl,-z,relro -m64
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 =
MAKEDIRS = /bin/mkdir -p
MKDIR_P = /bin/mkdir -p
INSTALL_DATA = /bin/install -c -m 644
INSTALL_SCRIPT = /bin/install -c
INSTALL_PROGRAM = /bin/install -c
SET_MAKE =
LN_S = ln -s
NM = nm
DLLWRAP =
WINDRES =
OBJCOPY = :
OBJDUMP = objdump
ASFLAGS =
AS = as
ARFLAGS = rcD
AR = ar
RANLIB = ranlib
try_header =
CC_VERSION_MESSAGE = gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-16)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CC_VERSION = gcc --version
CSRCFLAG =
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 = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic
OBJEXT = o
CPPFLAGS =
LDFLAGS = -L. -Wl,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic
CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic -fPIC
CXX = g++
CC = gcc
NACL_LIB_PATH =
NACL_SDK_VARIANT =
NACL_SDK_ROOT =
NACL_TOOLCHAIN =
target_os = linux
target_vendor = redhat
target_cpu = x86_64
target = x86_64-redhat-linux-gnu
host_os = linux-gnu
host_vendor = redhat
host_cpu = x86_64
host = x86_64-redhat-linux-gnu
RUBY_VERSION_NAME = ruby-
RUBYW_BASE_NAME = rubyw
RUBY_BASE_NAME = ruby
build_os = linux-gnu
build_vendor = redhat
build_cpu = x86_64
build = x86_64-redhat-linux-gnu
RUBY_PROGRAM_VERSION = 2.4.2
cxxflags = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format
cppflags =
cflags = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format
target_alias =
host_alias = x86_64-redhat-linux-gnu
build_alias = x86_64-redhat-linux-gnu
LIBS = -lpthread -ldl -lcrypt -lm
ECHO_T =
ECHO_N = -n
ECHO_C =
DEFS =
mandir = /opt/cpanel/ea-ruby24/root/usr/share/man
localedir = /opt/cpanel/ea-ruby24/root/usr/share/locale
libdir = /opt/cpanel/ea-ruby24/root/usr/lib64
psdir = /opt/cpanel/ea-ruby24/root/usr/share/doc/ruby
pdfdir = /opt/cpanel/ea-ruby24/root/usr/share/doc/ruby
dvidir = /opt/cpanel/ea-ruby24/root/usr/share/doc/ruby
htmldir = /opt/cpanel/ea-ruby24/root/usr/share/doc/ruby
infodir = /opt/cpanel/ea-ruby24/root/usr/share/info
docdir = /opt/cpanel/ea-ruby24/root/usr/share/doc/ruby
oldincludedir = /usr/include
includedir = /opt/cpanel/ea-ruby24/root/usr/include
localstatedir = /opt/cpanel/ea-ruby24/root/usr/var
sharedstatedir = /opt/cpanel/ea-ruby24/root/usr/com
sysconfdir = /opt/cpanel/ea-ruby24/root/etc
datadir = /opt/cpanel/ea-ruby24/root/usr/share
datarootdir = /opt/cpanel/ea-ruby24/root/usr/share
libexecdir = /opt/cpanel/ea-ruby24/root/usr/libexec
sbindir = /opt/cpanel/ea-ruby24/root/usr/sbin
bindir = /opt/cpanel/ea-ruby24/root/usr/bin
exec_prefix = /opt/cpanel/ea-ruby24/root/usr
PACKAGE_URL =
PACKAGE_BUGREPORT =
PACKAGE_STRING =
PACKAGE_VERSION =
PACKAGE_TARNAME =
PACKAGE_NAME =
PATH_SEPARATOR = :
SHELL = /bin/sh
UNICODE_VERSION = 9.0.0
archdir = /opt/cpanel/ea-ruby24/root/usr/lib64/ruby
topdir = /opt/cpanel/ea-ruby24/root/usr/lib64/ruby
Activated Ruby gems
did_you_mean => 1.1.0
Ruby load path ($LOAD_PATH)
/opt/cpanel/ea-ruby24/root/usr/share/gems/gems/did_you_mean-1.1.0/lib
/opt/cpanel/ea-ruby24/root/usr/local/share/ruby/site_ruby
/opt/cpanel/ea-ruby24/root/usr/local/lib64/ruby/site_ruby
/opt/cpanel/ea-ruby24/root/usr/share/ruby/vendor_ruby
/opt/cpanel/ea-ruby24/root/usr/lib64/ruby/vendor_ruby
/opt/cpanel/ea-ruby24/root/usr/share/rubygems
/opt/cpanel/ea-ruby24/root/usr/share/ruby
/opt/cpanel/ea-ruby24/root/usr/lib64/ruby
Ruby loaded libraries ($LOADED_FEATURES)
enumerator.so
thread.rb
rational.so
complex.so
/opt/cpanel/ea-ruby24/root/usr/lib64/ruby/enc/encdb.so
/opt/cpanel/ea-ruby24/root/usr/lib64/ruby/enc/trans/transdb.so
/opt/cpanel/ea-ruby24/root/usr/share/ruby/unicode_normalize.rb
/opt/cpanel/ea-ruby24/root/usr/lib64/ruby/rbconfig.rb
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/compatibility.rb
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/defaults.rb
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/deprecate.rb
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/errors.rb
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/version.rb
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/requirement.rb
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/platform.rb
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/basic_specification.rb
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/stub_specification.rb
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/util/list.rb
/opt/cpanel/ea-ruby24/root/usr/lib64/ruby/stringio.so
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/specification.rb
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/exceptions.rb
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/defaults/operating_system.rb
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/core_ext/kernel_gem.rb
/opt/cpanel/ea-ruby24/root/usr/share/ruby/monitor.rb
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems.rb
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/dependency.rb
/opt/cpanel/ea-ruby24/root/usr/share/rubygems/rubygems/path_support.rb
/opt/cpanel/ea-ruby24/root/usr/share/gems/gems/did_you_mean-1.1.0/lib/did_you_mean/version.rb
/opt/cpanel/ea-ruby24/root/usr/share/gems/gems/did_you_mean-1.1.0/lib/did_you_mean/core_ext/name_error.rb
/opt/cpanel/ea-ruby24/root/usr/share/gems/gems/did_you_mean-1.1.0/lib/did_you_mean/levenshtein.rb
/opt/cpanel/ea-ruby24/root/usr/share/gems/gems/did_you_mean-1.1.0/lib/did_you_mean/jaro_winkler.rb
/opt/cpanel/ea-ruby24/root/usr/share/gems/gems/did_you_mean-1.1.0/lib/did_you_mean/spell_checker.rb
/opt/cpanel/ea-ruby24/root/usr/share/ruby/delegate.rb
/opt/cpanel/ea-ruby24/root/usr/share/gems/gems/did_you_mean-1.1.0/lib/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
/opt/cpanel/ea-ruby24/root/usr/share/gems/gems/did_you_mean-1.1.0/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
/opt/cpanel/ea-ruby24/root/usr/share/gems/gems/did_you_mean-1.1.0/lib/did_you_mean/spell_checkers/name_error_checkers.rb
/opt/cpanel/ea-ruby24/root/usr/share/gems/gems/did_you_mean-1.1.0/lib/did_you_mean/spell_checkers/method_name_checker.rb
/opt/cpanel/ea-ruby24/root/usr/share/gems/gems/did_you_mean-1.1.0/lib/did_you_mean/spell_checkers/null_checker.rb
/opt/cpanel/ea-ruby24/root/usr/share/gems/gems/did_you_mean-1.1.0/lib/did_you_mean/formatter.rb
/opt/cpanel/ea-ruby24/root/usr/share/gems/gems/did_you_mean-1.1.0/lib/did_you_mean.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/constants.rb
/opt/cpanel/ea-ruby24/root/usr/lib64/ruby/etc.so
/opt/cpanel/ea-ruby24/root/usr/share/ruby/fileutils.rb
/opt/cpanel/ea-ruby24/root/usr/share/ruby/tmpdir.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/utils/tmpio.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/platform_info.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/platform_info/operating_system.rb
/opt/cpanel/ea-ruby24/root/usr/share/ruby/vendor_ruby/passenger/passenger_native_support.so
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/native_support.rb
/opt/cpanel/ea-ruby24/root/usr/lib64/ruby/socket.so
/opt/cpanel/ea-ruby24/root/usr/lib64/ruby/io/wait.so
/opt/cpanel/ea-ruby24/root/usr/share/ruby/socket.rb
/opt/cpanel/ea-ruby24/root/usr/lib64/ruby/pathname.so
/opt/cpanel/ea-ruby24/root/usr/share/ruby/pathname.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/ruby_core_enhancements.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/ruby_core_io_enhancements.rb
/opt/cpanel/ea-ruby24/root/usr/share/ruby/base64.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/utils.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/preloader_shared_helpers.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/public_api.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/debug_logging.rb
/opt/cpanel/ea-ruby24/root/usr/share/ruby/shellwords.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/utils/shellwords.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/loader_shared_helpers.rb
/opt/cpanel/ea-ruby24/root/usr/lib64/ruby/fcntl.so
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/message_channel.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/message_client.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/utils/native_support_utils.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/utils/unseekable_socket.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/request_handler.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/utils/tee_input.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/rack/thread_handler_extension.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/version.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/version.rb
/opt/cpanel/ea-ruby24/root/usr/share/passenger/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails.rb

Related

How do I install sqlite3 gem on an M1 Mac?

I am trying to install the sqlite3-ruby gem on my Mac, which is running an M1 Pro chip.
The installation fails with the following output:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/jay/.frum/versions/3.1.0/lib/ruby/gems/3.1.0/gems/sqlite3-1.4.2/ext/sqlite3
/Users/jay/.frum/versions/3.1.0/bin/ruby -I /Users/jay/.frum/versions/3.1.0/lib/ruby/3.1.0 -r ./siteconf20220215-37077-7vshdb.rb extconf.rb
checking for sqlite3.h... yes
checking for pthread_create() in -lpthread... yes
checking for -ldl... yes
checking for sqlite3_libversion_number() in -lsqlite3... no
sqlite3 is missing. Try 'brew install sqlite3',
'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
and check your shared library search path (the
location where your sqlite3 shared library is located).
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Looking at the mkmf.log file, there are a number of errors that seem to be related to compilation process building for the wrong architecture:
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/jay/.frum/versions/3.1.0/lib pkg-config --exists sqlite3
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/jay/.frum/versions/3.1.0/lib pkg-config --libs sqlite3 |
=> "-L/opt/homebrew/Cellar/sqlite/3.37.2/lib -lsqlite3\n"
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/jay/.frum/versions/3.1.0/lib "clang -o conftest -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0/arm64-darwin21 -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0/ruby/backward -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe conftest.c -L. -L/Users/jay/.frum/versions/3.1.0/lib -L. -fstack-protector-strong -L/usr/local/lib -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc "
ld: warning: ignoring file /Users/jay/.frum/versions/3.1.0/lib/libruby.3.1-static.a, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/jay/.frum/versions/3.1.0/lib "clang -o conftest -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0/arm64-darwin21 -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0/ruby/backward -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe conftest.c -L. -L/Users/jay/.frum/versions/3.1.0/lib -L. -fstack-protector-strong -L/usr/local/lib -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc -L/opt/homebrew/Cellar/sqlite/3.37.2/lib -lsqlite3 "
ld: warning: ignoring file /Users/jay/.frum/versions/3.1.0/lib/libruby.3.1-static.a, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/Cellar/sqlite/3.37.2/lib/libsqlite3.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/jay/.frum/versions/3.1.0/lib pkg-config --cflags-only-I sqlite3 |
=> "-I/opt/homebrew/Cellar/sqlite/3.37.2/include\n"
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/jay/.frum/versions/3.1.0/lib pkg-config --cflags-only-other sqlite3 |
=> "\n"
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/jay/.frum/versions/3.1.0/lib pkg-config --libs-only-l sqlite3 |
=> "-lsqlite3\n"
package configuration for sqlite3
incflags: -I/opt/homebrew/Cellar/sqlite/3.37.2/include
cflags:
ldflags: -L/opt/homebrew/Cellar/sqlite/3.37.2/lib
libs: -lsqlite3
find_header: checking for sqlite3.h... -------------------- yes
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/jay/.frum/versions/3.1.0/lib "clang -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0/arm64-darwin21 -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0/ruby/backward -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0 -I. -I/opt/homebrew/Cellar/sqlite/3.37.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe -c conftest.c"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <sqlite3.h>
/* end */
--------------------
find_library: checking for pthread_create() in -lpthread... -------------------- yes
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/jay/.frum/versions/3.1.0/lib "clang -o conftest -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0/arm64-darwin21 -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0/ruby/backward -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0 -I. -I/opt/homebrew/Cellar/sqlite/3.37.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe conftest.c -L. -L/Users/jay/.frum/versions/3.1.0/lib -L. -fstack-protector-strong -L/usr/local/lib -L/opt/homebrew/Cellar/sqlite/3.37.2/lib -lsqlite3 -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc -lpthread -lsqlite3 "
conftest.c:14:57: error: use of undeclared identifier 'pthread_create'
int t(void) { void ((*volatile p)()); p = (void ((*)()))pthread_create; return !p; }
^
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: extern int t(void);
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: int (* volatile tp)(void)=(int (*)(void))&t;
9: printf("%d", (*tp)());
10: }
11:
12: return !!argv[argc];
13: }
14: int t(void) { void ((*volatile p)()); p = (void ((*)()))pthread_create; return !p; }
/* end */
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/jay/.frum/versions/3.1.0/lib "clang -o conftest -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0/arm64-darwin21 -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0/ruby/backward -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0 -I. -I/opt/homebrew/Cellar/sqlite/3.37.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe conftest.c -L. -L/Users/jay/.frum/versions/3.1.0/lib -L. -fstack-protector-strong -L/usr/local/lib -L/opt/homebrew/Cellar/sqlite/3.37.2/lib -lsqlite3 -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc -lpthread -lsqlite3 "
ld: warning: ignoring file /opt/homebrew/Cellar/sqlite/3.37.2/lib/libsqlite3.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /Users/jay/.frum/versions/3.1.0/lib/libruby.3.1-static.a, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: extern int t(void);
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: int (* volatile tp)(void)=(int (*)(void))&t;
9: printf("%d", (*tp)());
10: }
11:
12: return !!argv[argc];
13: }
14: extern void pthread_create();
15: int t(void) { pthread_create(); return 0; }
/* end */
--------------------
have_library: checking for -ldl... -------------------- yes
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/jay/.frum/versions/3.1.0/lib "clang -o conftest -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0/arm64-darwin21 -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0/ruby/backward -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0 -I. -I/opt/homebrew/Cellar/sqlite/3.37.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe conftest.c -L. -L/Users/jay/.frum/versions/3.1.0/lib -L. -fstack-protector-strong -L/usr/local/lib -L/opt/homebrew/Cellar/sqlite/3.37.2/lib -lpthread -lsqlite3 -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc -ldl -lpthread -lsqlite3 "
ld: warning: ignoring file /opt/homebrew/Cellar/sqlite/3.37.2/lib/libsqlite3.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /Users/jay/.frum/versions/3.1.0/lib/libruby.3.1-static.a, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: extern int t(void);
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: int (* volatile tp)(void)=(int (*)(void))&t;
9: printf("%d", (*tp)());
10: }
11:
12: return !!argv[argc];
13: }
14:
15: int t(void) { ; return 0; }
/* end */
--------------------
find_library: checking for sqlite3_libversion_number() in -lsqlite3... -------------------- no
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/jay/.frum/versions/3.1.0/lib "clang -o conftest -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0/arm64-darwin21 -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0/ruby/backward -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0 -I. -I/opt/homebrew/Cellar/sqlite/3.37.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe conftest.c -L. -L/Users/jay/.frum/versions/3.1.0/lib -L. -fstack-protector-strong -L/usr/local/lib -L/opt/homebrew/Cellar/sqlite/3.37.2/lib -ldl -lpthread -lsqlite3 -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc -lsqlite3 -ldl -lpthread -lsqlite3 "
conftest.c:14:57: error: use of undeclared identifier 'sqlite3_libversion_number'
int t(void) { void ((*volatile p)()); p = (void ((*)()))sqlite3_libversion_number; return !p; }
^
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: extern int t(void);
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: int (* volatile tp)(void)=(int (*)(void))&t;
9: printf("%d", (*tp)());
10: }
11:
12: return !!argv[argc];
13: }
14: int t(void) { void ((*volatile p)()); p = (void ((*)()))sqlite3_libversion_number; return !p; }
/* end */
DYLD_FALLBACK_LIBRARY_PATH=.:/Users/jay/.frum/versions/3.1.0/lib "clang -o conftest -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0/arm64-darwin21 -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0/ruby/backward -I/Users/jay/.frum/versions/3.1.0/include/ruby-3.1.0 -I. -I/opt/homebrew/Cellar/sqlite/3.37.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wextra-tokens -Wundef -pipe conftest.c -L. -L/Users/jay/.frum/versions/3.1.0/lib -L. -fstack-protector-strong -L/usr/local/lib -L/opt/homebrew/Cellar/sqlite/3.37.2/lib -ldl -lpthread -lsqlite3 -lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc -lsqlite3 -ldl -lpthread -lsqlite3 "
ld: warning: ignoring file /opt/homebrew/Cellar/sqlite/3.37.2/lib/libsqlite3.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /Users/jay/.frum/versions/3.1.0/lib/libruby.3.1-static.a, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
"_sqlite3_libversion_number", referenced from:
_t in conftest-593102.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: extern int t(void);
5: int main(int argc, char **argv)
6: {
7: if (argc > 1000000) {
8: int (* volatile tp)(void)=(int (*)(void))&t;
9: printf("%d", (*tp)());
10: }
11:
12: return !!argv[argc];
13: }
14: extern void sqlite3_libversion_number();
15: int t(void) { sqlite3_libversion_number(); return 0; }
/* end */
--------------------
I installed sqlite3 via Homebrew, with the following output:
sqlite: stable 3.37.2 (bottled) [keg-only]
Command-line interface for SQLite
https://sqlite.org/index.html
/opt/homebrew/Cellar/sqlite/3.37.2 (11 files, 4.3MB)
Poured from bottle on 2022-02-15 at 13:01:01
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/sqlite.rb
License: blessing
==> Dependencies
Required: readline ✔
==> Caveats
sqlite is keg-only, which means it was not symlinked into /opt/homebrew,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
If you need to have sqlite first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/sqlite/bin:$PATH"' >> ~/.zshrc
For compilers to find sqlite you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/sqlite/lib"
export CPPFLAGS="-I/opt/homebrew/opt/sqlite/include"
For pkg-config to find sqlite you may need to set:
export PKG_CONFIG_PATH="/opt/homebrew/opt/sqlite/lib/pkgconfig"
Taking the advice from Homebrew, I set bundle config build.sqlite3 --with-sqlite3-include=$(brew --prefix sqlite)/include --with-sqlite3-lib=$(brew --prefix sqlite)/lib but I got what appears to be the same result.
Can somebody please tell me what's the correct way to install this gem given this setup? Thank you very much.
In case anyone else stumbles along this, I had a similar issue. I have my dev environment set up part emulated and part ARM.
To navigate this, I have two different versions of Homebrew installed. One version is for M1 architecture, which lives in /opt/homebrew/. And I have a version of Homebrew that runs on x86 architecture that lives in /usr/local/Homebrew.
I have the x86 version aliased to ibrew, like this:
alias ibrew='arch --x86_64 /usr/local/Homebrew/bin/brew'
(See this answer for more info on running two separate Homebrew versions.)
OP's bundle config command worked for me, I just had to swap out brew for ibrew:
bundle config build.sqlite3 --with-sqlite3-include=$(brew --prefix sqlite)/include --with-sqlite3-lib=$(brew --prefix sqlite)/lib
have you installed sqilte3 already? it said
sqlite3 is missing. Try 'brew install sqlite3',
'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
and check your shared library search path (the
location where your sqlite3 shared library is located).
so try brew install sqlite first
https://formulae.brew.sh/formula/sqlite

Apache/Passenger - cannot load such file -- bundler/setup (LoadError)

I've spun up two different servers to run my rails app using Apache and Passenger but am getting the same error and can't seem to debug the issue.
cannot load such file -- bundler/setup (LoadError)
Error:
Web application could not be started
Error ID:
e36eb8ab
Details:
cannot load such file -- bundler/setup (LoadError)
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:456:in `activate_gem'
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:323:in `block in run_load_path_setup_code'
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:461:in `running_bundler'
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:322:in `run_load_path_setup_code'
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/helper-scripts/rack-preloader.rb:100:in `preload_app'
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/helper-scripts/rack-preloader.rb:156:in `<module:App>'
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/helper-scripts/rack-preloader.rb:29:in `<main>'
System information:
Application root
/home/ubuntu/sephcordovano
Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV, NODE_ENV and PASSENGER_APP_ENV)
development
Ruby interpreter command
/home/ubuntu/.rbenv/versions/2.4.2/bin/ruby
User and groups
uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),109(netdev),110(lxd)
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.XXXX4V4Jbk
USER = ubuntu
PASSENGER_USE_FEEDBACK_FD = true
APACHE_LOG_DIR = /var/log/apache2
PATH = /home/ubuntu/.rbenv/shims:/home/ubuntu/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
PWD = /home/ubuntu/sephcordovano
APACHE_RUN_GROUP = www-data
LANG = C
SHLVL = 0
HOME = /home/ubuntu
LOGNAME = ubuntu
SERVER_SOFTWARE = Apache/2.4.18 (Ubuntu) Phusion_Passenger/5.1.12
XDG_DATA_DIRS = /usr/local/share:/usr/share:/var/lib/snapd/desktop
APACHE_LOCK_DIR = /var/lock/apache2
APACHE_RUN_DIR = /var/run/apache2
IN_PASSENGER = 1
PYTHONUNBUFFERED = 1
NODE_PATH = /var/lib/gems/2.3.0/gems/passenger-5.1.12/src/nodejs_supportlib
RAILS_ENV = development
RACK_ENV = development
WSGI_ENV = development
NODE_ENV = development
PASSENGER_APP_ENV = development
Ulimits
Unknown
System metrics
------------- General -------------
Kernel version : 4.4.0-1047-aws
Uptime : 1h 45m 27s
Load averages : 0.08%, 0.02%, 0.10%
Fork rate : unknown
------------- CPU -------------
Number of CPUs : 1
Average CPU usage : 0% -- 0% user, 0% nice, 0% system, 100% idle
CPU 1 : 0% -- 0% user, 0% nice, 0% system, 100% idle
I/O pressure : 0%
CPU 1 : 0%
Interference from other VMs: 0%
CPU 1 : 0%
------------- Memory -------------
RAM total : 990 MB
RAM used : 148 MB (15%)
RAM free : 842 MB
Swap total : 1023 MB
Swap used : 7 MB (1%)
Swap free : 1016 MB
Swap in : unknown
Swap out : unknown
General Ruby interpreter information
RUBY_VERSION = 2.4.2
RUBY_PLATFORM = x86_64-linux
RUBY_ENGINE = ruby
RubyGems version = 2.6.13
RubyGems paths = ["/home/ubuntu/.gem/ruby/2.4.0", "/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0"]
Ruby configuration (RbConfig::CONFIG)
DESTDIR =
MAJOR = 2
MINOR = 4
TEENY = 2
PATCHLEVEL = 198
INSTALL = /usr/bin/install -c
EXEEXT =
prefix = /home/ubuntu/.rbenv/versions/2.4.2
ruby_install_name = ruby
RUBY_INSTALL_NAME = ruby
RUBY_SO_NAME = ruby
exec = exec
ruby_pc = ruby-2.4.pc
PACKAGE = ruby
BUILTIN_TRANSSRCS = enc/trans/newline.c
USE_RUBYGEMS = YES
MANTYPE = doc
NROFF = /usr/bin/nroff
vendorarchhdrdir = /home/ubuntu/.rbenv/versions/2.4.2/include/ruby-2.4.0/vendor_ruby/x86_64-linux
sitearchhdrdir = /home/ubuntu/.rbenv/versions/2.4.2/include/ruby-2.4.0/site_ruby/x86_64-linux
rubyarchhdrdir = /home/ubuntu/.rbenv/versions/2.4.2/include/ruby-2.4.0/x86_64-linux
vendorhdrdir = /home/ubuntu/.rbenv/versions/2.4.2/include/ruby-2.4.0/vendor_ruby
sitehdrdir = /home/ubuntu/.rbenv/versions/2.4.2/include/ruby-2.4.0/site_ruby
rubyhdrdir = /home/ubuntu/.rbenv/versions/2.4.2/include/ruby-2.4.0
RUBY_SEARCH_PATH =
UNIVERSAL_INTS =
UNIVERSAL_ARCHNAMES =
configure_args = '--prefix=/home/ubuntu/.rbenv/versions/2.4.2' 'LDFLAGS=-L/home/ubuntu/.rbenv/versions/2.4.2/lib ' 'CPPFLAGS=-I/home/ubuntu/.rbenv/versions/2.4.2/include '
CONFIGURE = configure
vendorarchdir = /home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/vendor_ruby/2.4.0/x86_64-linux
vendorlibdir = /home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/vendor_ruby/2.4.0
vendordir = /home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/vendor_ruby
sitearchdir = /home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/x86_64-linux
sitelibdir = /home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0
sitedir = /home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/site_ruby
rubyarchdir = /home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux
rubylibdir = /home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0
ruby_version = 2.4.0
sitearch = x86_64-linux
arch = x86_64-linux
sitearchincludedir = /home/ubuntu/.rbenv/versions/2.4.2/include/x86_64-linux
archincludedir = /home/ubuntu/.rbenv/versions/2.4.2/include/x86_64-linux
sitearchlibdir = /home/ubuntu/.rbenv/versions/2.4.2/lib/x86_64-linux
archlibdir = /home/ubuntu/.rbenv/versions/2.4.2/lib/x86_64-linux
libdirname = libdir
RUBY_EXEC_PREFIX = /home/ubuntu/.rbenv/versions/2.4.2
RUBY_LIB_VERSION =
RUBY_LIB_VERSION_STYLE = 3 /* full */
RI_BASE_NAME = ri
ridir = /home/ubuntu/.rbenv/versions/2.4.2/share/ri
rubysitearchprefix = /home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/x86_64-linux
rubyarchprefix = /home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/x86_64-linux
MAKEFILES = Makefile GNUmakefile
PLATFORM_DIR =
THREAD_MODEL = pthread
SYMBOL_PREFIX =
EXPORT_PREFIX =
COMMON_HEADERS =
COMMON_MACROS =
COMMON_LIBS =
MAINLIBS =
ENABLE_SHARED = no
DLDLIBS = -lc
SOLIBS =
LIBRUBYARG_SHARED = -Wl,-rpath,/home/ubuntu/.rbenv/versions/2.4.2/lib -L/home/ubuntu/.rbenv/versions/2.4.2/lib
LIBRUBYARG_STATIC = -Wl,-rpath,/home/ubuntu/.rbenv/versions/2.4.2/lib -L/home/ubuntu/.rbenv/versions/2.4.2/lib -lruby-static
LIBRUBYARG = -Wl,-rpath,/home/ubuntu/.rbenv/versions/2.4.2/lib -L/home/ubuntu/.rbenv/versions/2.4.2/lib -lruby-static
LIBRUBY = libruby-static.a
LIBRUBY_ALIASES = libruby.so
LIBRUBY_SO = libruby.so.2.4.2
LIBRUBY_A = libruby-static.a
RUBYW_INSTALL_NAME =
rubyw_install_name =
EXTDLDFLAGS =
EXTLDFLAGS =
strict_warnflags = -std=gnu99
warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wno-maybe-uninitialized
debugflags = -ggdb3
optflags = -O3 -fno-fast-math
NULLCMD = :
DLNOBJ = dln.o
INSTALL_STATIC_LIBRARY = yes
EXECUTABLE_EXTS =
ARCHFILE =
LIBRUBY_RELATIVE = no
EXTOUT = .ext
PREP = miniruby
CROSS_COMPILING = no
TEST_RUNNABLE = yes
rubylibprefix = /home/ubuntu/.rbenv/versions/2.4.2/lib/ruby
setup = Setup
ENCSTATIC =
EXTSTATIC =
STRIP = strip -S -x
TRY_LINK =
PRELOADENV = LD_PRELOAD
LIBPATHENV = LD_LIBRARY_PATH
RPATHFLAG = -Wl,-rpath,%1$-s
LIBPATHFLAG = -L%1$-s
LINK_SO =
ASMEXT = S
LIBEXT = a
DLEXT2 =
DLEXT = so
LDSHAREDXX = g++ -shared
LDSHARED = gcc -shared
CCDLFLAGS = -fPIC
STATIC =
ARCH_FLAG =
DLDFLAGS = -L/home/ubuntu/.rbenv/versions/2.4.2/lib -Wl,--compress-debug-sections=zlib
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 =
PYTHON =
DOXYGEN =
DOT =
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
ARFLAGS = rcD
AR = ar
RANLIB = ranlib
try_header =
CC_VERSION_MESSAGE = gcc (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CC_VERSION = gcc --version
CSRCFLAG =
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 = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wno-maybe-uninitialized
OBJEXT = o
CPPFLAGS = -I/home/ubuntu/.rbenv/versions/2.4.2/include
LDFLAGS = -L. -L/home/ubuntu/.rbenv/versions/2.4.2/lib -fstack-protector -rdynamic -Wl,-export-dynamic
CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wno-maybe-uninitialized
CXX = g++
CC = gcc
NACL_LIB_PATH =
NACL_SDK_VARIANT =
NACL_SDK_ROOT =
NACL_TOOLCHAIN =
target_os = linux
target_vendor = pc
target_cpu = x86_64
target = x86_64-pc-linux-gnu
host_os = linux-gnu
host_vendor = pc
host_cpu = x86_64
host = x86_64-pc-linux-gnu
RUBY_VERSION_NAME = ruby-2.4.0
RUBYW_BASE_NAME = rubyw
RUBY_BASE_NAME = ruby
build_os = linux-gnu
build_vendor = pc
build_cpu = x86_64
build = x86_64-pc-linux-gnu
RUBY_PROGRAM_VERSION = 2.4.2
cxxflags = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wno-maybe-uninitialized
cppflags =
cflags = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wno-maybe-uninitialized
target_alias =
host_alias =
build_alias =
LIBS = -lpthread -ldl -lcrypt -lm
ECHO_T =
ECHO_N = -n
ECHO_C =
DEFS =
mandir = /home/ubuntu/.rbenv/versions/2.4.2/share/man
localedir = /home/ubuntu/.rbenv/versions/2.4.2/share/locale
libdir = /home/ubuntu/.rbenv/versions/2.4.2/lib
psdir = /home/ubuntu/.rbenv/versions/2.4.2/share/doc/ruby
pdfdir = /home/ubuntu/.rbenv/versions/2.4.2/share/doc/ruby
dvidir = /home/ubuntu/.rbenv/versions/2.4.2/share/doc/ruby
htmldir = /home/ubuntu/.rbenv/versions/2.4.2/share/doc/ruby
infodir = /home/ubuntu/.rbenv/versions/2.4.2/share/info
docdir = /home/ubuntu/.rbenv/versions/2.4.2/share/doc/ruby
oldincludedir = /usr/include
includedir = /home/ubuntu/.rbenv/versions/2.4.2/include
localstatedir = /home/ubuntu/.rbenv/versions/2.4.2/var
sharedstatedir = /home/ubuntu/.rbenv/versions/2.4.2/com
sysconfdir = /home/ubuntu/.rbenv/versions/2.4.2/etc
datadir = /home/ubuntu/.rbenv/versions/2.4.2/share
datarootdir = /home/ubuntu/.rbenv/versions/2.4.2/share
libexecdir = /home/ubuntu/.rbenv/versions/2.4.2/libexec
sbindir = /home/ubuntu/.rbenv/versions/2.4.2/sbin
bindir = /home/ubuntu/.rbenv/versions/2.4.2/bin
exec_prefix = /home/ubuntu/.rbenv/versions/2.4.2
PACKAGE_URL =
PACKAGE_BUGREPORT =
PACKAGE_STRING =
PACKAGE_VERSION =
PACKAGE_TARNAME =
PACKAGE_NAME =
PATH_SEPARATOR = :
SHELL = /bin/bash
UNICODE_VERSION = 9.0.0
archdir = /home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux
topdir = /home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux
Activated Ruby gems
did_you_mean => 1.1.0
Ruby load path ($LOAD_PATH)
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/x86_64-linux
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/site_ruby
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/vendor_ruby/2.4.0
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/vendor_ruby/2.4.0/x86_64-linux
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/vendor_ruby
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux
Ruby loaded libraries ($LOADED_FEATURES)
enumerator.so
thread.rb
rational.so
complex.so
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux/enc/encdb.so
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux/enc/trans/transdb.so
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/unicode_normalize.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux/rbconfig.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/compatibility.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/defaults.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/deprecate.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/errors.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/version.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/requirement.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/platform.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/basic_specification.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/stub_specification.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/util/list.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux/stringio.so
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/specification.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/exceptions.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/dependency.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/core_ext/kernel_gem.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/monitor.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/rubygems/path_support.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/version.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/core_ext/name_error.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/levenshtein.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/jaro_winkler.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/spell_checker.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/delegate.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/spell_checkers/name_error_checkers.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/spell_checkers/method_name_checker.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/spell_checkers/null_checker.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean/formatter.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/did_you_mean-1.1.0/lib/did_you_mean.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/constants.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux/etc.so
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/fileutils.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/tmpdir.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/utils/tmpio.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/platform_info.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/platform_info/ruby.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/platform_info/binary_compatibility.rb
/home/ubuntu/.passenger/native_support/5.1.12/ruby-2.4.2-x86_64-linux/passenger_native_support.so
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/native_support.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux/socket.so
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux/io/wait.so
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/socket.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux/pathname.so
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/pathname.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/ruby_core_enhancements.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/ruby_core_io_enhancements.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/base64.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/utils.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/public_api.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/debug_logging.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/shellwords.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/utils/shellwords.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb
/home/ubuntu/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux/fcntl.so
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/message_channel.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/message_client.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/utils/native_support_utils.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/utils/unseekable_socket.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/request_handler.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/utils/tee_input.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/version.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails/version.rb
/var/lib/gems/2.3.0/gems/passenger-5.1.12/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_rails/lib/union_station_hooks_rails.rb
Make sure you're pointing Nginx/apache properly inside /etc/nginx/nginx.conf
passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
passenger_ruby /home/app/.rvm/wrappers/default/ruby;
Find ruby by running which ruby

Phusion Passenger 4/Apache 2.4 can't find rack.rb

It appears this question has been asked before but I can't find the solution - it appears that I have all the right settings as generally advised elsewhere.
The error is:
cannot load such file -- rack (LoadError)
/usr/share/passenger/helper-scripts/rack-preloader.rb:109:in `require'
/usr/share/passenger/helper-scripts/rack-preloader.rb:109:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:160: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>'
I installed RVM Ruby and it appears that my PassengerRuby is correctly pointing to this installed Ruby. The only odd thing is that GEM_PATH is not set, while there's a variable called _ORIG_GEM_PATH that is set.
Here's a dump of the relevant environment printed out by Passenger:
Application root
/var/www/railsapps/postall/current
Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV, NODE_ENV and PASSENGER_APP_ENV)
production
Ruby interpreter command
/var/www/.rvm/wrappers/ruby-2.1.5#rails4/ruby
User and groups
uid=33(www-data) gid=33(www-data) groups=33(www-data),27(sudo)
Environment variables
APACHE_PID_FILE = /var/run/apache2/apache2.pid
rvm_bin_path = /var/www/.rvm/bin
GEM_HOME = /var/www/railsapps/postall/shared/bundle/ruby/2.1.0
APACHE_RUN_USER = www-data
SHELL = /bin/bash
IRBRC = /var/www/.rvm/rubies/ruby-2.1.5/.irbrc
PYTHONUNBUFFERED = 1
RACK_BASE_URI = /postall
PASSENGER_DEBUG_DIR = /tmp/passenger.spawn-debug.XXXXoOOdYl
SERVER_PORT = 443
MY_RUBY_HOME = /var/www/.rvm/rubies/ruby-2.1.5
USER = www-data
DOCUMENT_ROOT = /var/www
HTTPS = on
_system_type = Linux
REQUEST_URI = /postall/
rvm_path = /var/www/.rvm
RAILS_RELATIVE_URL_ROOT = /postall
IN_PASSENGER = 1
RACK_ENV = production
REMOTE_PORT = 52828
rvm_prefix = /var/www
PATH = /var/www/railsapps/postall/shared/bundle/ruby/2.1.0/bin:/var/www/.rvm/gems/ruby-2.1.5#rails4/bin:/var/www/.rvm/gems/ruby-2.1.5#global/bin:/var/www/.rvm/rubies/ruby-2.1.5/bin:/var/www/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
APACHE_LOG_DIR = /var/log/apache2
WSGI_ENV = production
SERVER_ADMIN = webmaster#localhost
PWD = /var/www/railsapps/postall/current
LANG = C
APACHE_RUN_GROUP = www-data
NODE_PATH = /usr/share/passenger/node
_system_arch = x86_64
NODE_ENV = production
_system_version = 14.04
REMOTE_ADDR = 98.248.156.170
rvm_version = 1.26.9 (master)
SERVER_NAME = 192.241.223.49
HOME = /var/www
SHLVL = 0
RAILS_ENV = production
rvm_ruby_string = ruby-2.1.5
SERVER_SOFTWARE = Apache/2.4.7 (Ubuntu)
LOGNAME = www-data
QUERY_STRING =
SERVER_ADDR = 192.241.223.49
GEM_PATH =
SERVER_PROTOCOL = HTTP/1.1
PASSENGER_APP_ENV = production
rvm_delete_flag = 0
APACHE_RUN_DIR = /var/run/apache2
APACHE_LOCK_DIR = /var/lock/apache2
REQUEST_METHOD = GET
RUBY_VERSION = ruby-2.1.5
_system_name = Ubuntu
PASSENGER_BASE_URI = /postall
_ORIGINAL_GEM_PATH = /var/www/.rvm/gems/ruby-2.1.5#rails4:/var/www/.rvm/gems/ruby-2.1.5#global
BUNDLE_BIN_PATH = /var/www/.rvm/gems/ruby-2.1.5#global/gems/bundler-1.7.6/bin/bundle
BUNDLE_GEMFILE = /var/www/railsapps/postall/releases/20150109062343/Gemfile
RUBYOPT = -rbundler/setup
RUBYLIB = /var/www/.rvm/gems/ruby-2.1.5#global/gems/bundler-1.7.6/lib
Ruby configuration (RbConfig::CONFIG)
DESTDIR =
MAJOR = 2
MINOR = 1
TEENY = 0
PATCHLEVEL = 273
INSTALL = /usr/bin/install
EXEEXT =
prefix = /var/www/.rvm/rubies/ruby-2.1.5
ruby_install_name = ruby
RUBY_INSTALL_NAME = ruby
RUBY_SO_NAME = ruby
exec = exec
ruby_pc = ruby-2.1.pc
PACKAGE = ruby
BUILTIN_TRANSSRCS = newline.c
USE_RUBYGEMS = YES
MANTYPE = doc
NROFF = /usr/bin/nroff
vendorarchhdrdir = /var/www/.rvm/rubies/ruby-2.1.5/include/ruby-2.1.0/vendor_ruby/x86_64-linux
sitearchhdrdir = /var/www/.rvm/rubies/ruby-2.1.5/include/ruby-2.1.0/site_ruby/x86_64-linux
rubyarchhdrdir = /var/www/.rvm/rubies/ruby-2.1.5/include/ruby-2.1.0/x86_64-linux
vendorhdrdir = /var/www/.rvm/rubies/ruby-2.1.5/include/ruby-2.1.0/vendor_ruby
sitehdrdir = /var/www/.rvm/rubies/ruby-2.1.5/include/ruby-2.1.0/site_ruby
rubyhdrdir = /var/www/.rvm/rubies/ruby-2.1.5/include/ruby-2.1.0
RUBY_SEARCH_PATH =
UNIVERSAL_INTS =
UNIVERSAL_ARCHNAMES =
configure_args = '--prefix=/usr/local/rvm/rubies/ruby-2.1.5' '--enable-load-relative' '--sysconfdir=/etc' '--disable-install-doc' '--enable-shared'
vendorarchdir = /var/www/.rvm/rubies/ruby-2.1.5/lib/ruby/vendor_ruby/2.1.0/x86_64-linux
vendorlibdir = /var/www/.rvm/rubies/ruby-2.1.5/lib/ruby/vendor_ruby/2.1.0
vendordir = /var/www/.rvm/rubies/ruby-2.1.5/lib/ruby/vendor_ruby
sitearchdir = /var/www/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/x86_64-linux
sitelibdir = /var/www/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0
sitedir = /var/www/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby
rubyarchdir = /var/www/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/x86_64-linux
rubylibdir = /var/www/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0
ruby_version = 2.1.0
sitearch = x86_64-linux
arch = x86_64-linux
sitearchincludedir = /var/www/.rvm/rubies/ruby-2.1.5/include/x86_64-linux
archincludedir = /var/www/.rvm/rubies/ruby-2.1.5/include/x86_64-linux
sitearchlibdir = /var/www/.rvm/rubies/ruby-2.1.5/lib/x86_64-linux
archlibdir = /var/www/.rvm/rubies/ruby-2.1.5/lib/x86_64-linux
libdirname = libdir
RUBY_EXEC_PREFIX =
RUBY_LIB_VERSION =
RUBY_LIB_VERSION_STYLE = 3 /* full */
RI_BASE_NAME = ri
ridir = /var/www/.rvm/rubies/ruby-2.1.5/share/ri
rubysitearchprefix = /var/www/.rvm/rubies/ruby-2.1.5/lib/ruby/x86_64-linux
rubyarchprefix = /var/www/.rvm/rubies/ruby-2.1.5/lib/ruby/x86_64-linux
MAKEFILES = Makefile GNUmakefile
PLATFORM_DIR =
THREAD_MODEL = pthread
SYMBOL_PREFIX =
EXPORT_PREFIX =
COMMON_HEADERS =
COMMON_MACROS =
COMMON_LIBS =
MAINLIBS =
ENABLE_SHARED = yes
DLDLIBS = -lc
SOLIBS = -lpthread -ldl -lcrypt -lm
LIBRUBYARG_SHARED = -Wl,-rpath,'${ORIGIN}/../lib' -Wl,-R -Wl,'${ORIGIN}/../lib' -L'${ORIGIN}/../lib' -lruby
LIBRUBYARG_STATIC = -Wl,-rpath,'${ORIGIN}/../lib' -Wl,-R -Wl,'${ORIGIN}/../lib' -L'${ORIGIN}/../lib' -lruby-static
LIBRUBYARG = -Wl,-rpath,'${ORIGIN}/../lib' -Wl,-R -Wl,'${ORIGIN}/../lib' -L'${ORIGIN}/../lib' -lruby
LIBRUBY = libruby.so.2.1.0
LIBRUBY_ALIASES = libruby.so.2.1 libruby.so
LIBRUBY_SO = libruby.so.2.1.0
LIBRUBY_A = libruby-static.a
RUBYW_INSTALL_NAME =
rubyw_install_name =
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 = nodoc
CAPITARGET = nodoc
RDOCTARGET = nodoc
DTRACE_GLOMMED_OBJ =
DTRACE_OBJ =
DTRACE_EXT = dmyh
EXECUTABLE_EXTS =
ARCHFILE =
LIBRUBY_RELATIVE = yes
EXTOUT = .ext
RUNRUBY_COMMAND = $(MINIRUBY) $(srcdir)/tool/runruby.rb --extout=.ext $(RUNRUBYOPT)
PREP = miniruby
BTESTRUBY = $(MINIRUBY)
CROSS_COMPILING = no
TEST_RUNNABLE = yes
rubylibprefix = /var/www/.rvm/rubies/ruby-2.1.5/lib/ruby
setup = Setup
EXTSTATIC =
STRIP = strip -S -x
TRY_LINK =
LIBPATHENV = LD_LIBRARY_PATH
RPATHFLAG = -Wl,-R%1$-s
LIBPATHFLAG = -L%1$-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 -m 644
INSTALL_SCRIPT = /usr/bin/install
INSTALL_PROGRAM = /usr/bin/install
SET_MAKE =
LN_S = ln -s
NM = nm
DLLWRAP =
WINDRES =
OBJCOPY = :
OBJDUMP = objdump
ASFLAGS =
AS = as
AR = ar
RANLIB = ranlib
try_header =
CC_VERSION = gcc -v
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 = -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
CXX = g++
OBJEXT = o
CPPFLAGS =
LDFLAGS = -L. -fstack-protector -rdynamic -Wl,-export-dynamic
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 -fPIC
CC = gcc
NACL_SDK_VARIANT =
NACL_SDK_ROOT =
NACL_TOOLCHAIN =
target_os = linux
target_vendor = unknown
target_cpu = x86_64
target = x86_64-unknown-linux-gnu
host_os = linux-gnu
host_vendor = unknown
host_cpu = x86_64
host = x86_64-unknown-linux-gnu
RUBY_VERSION_NAME = ruby-2.1.0
RUBYW_BASE_NAME = rubyw
RUBY_BASE_NAME = ruby
build_os = linux-gnu
build_vendor = unknown
build_cpu = x86_64
build = x86_64-unknown-linux-gnu
RUBY_RELEASE_DATE = 2014-11-13
RUBY_PROGRAM_VERSION = 2.1.5
target_alias =
host_alias =
build_alias =
LIBS = -lpthread -ldl -lcrypt -lm
ECHO_T =
ECHO_N = -n
ECHO_C =
DEFS =
mandir = /var/www/.rvm/rubies/ruby-2.1.5/share/man
localedir = /var/www/.rvm/rubies/ruby-2.1.5/share/locale
libdir = /var/www/.rvm/rubies/ruby-2.1.5/lib
psdir = /var/www/.rvm/rubies/ruby-2.1.5/share/doc/ruby
pdfdir = /var/www/.rvm/rubies/ruby-2.1.5/share/doc/ruby
dvidir = /var/www/.rvm/rubies/ruby-2.1.5/share/doc/ruby
htmldir = /var/www/.rvm/rubies/ruby-2.1.5/share/doc/ruby
infodir = /var/www/.rvm/rubies/ruby-2.1.5/share/info
docdir = /var/www/.rvm/rubies/ruby-2.1.5/share/doc/ruby
oldincludedir = /usr/include
includedir = /var/www/.rvm/rubies/ruby-2.1.5/include
localstatedir = /var/www/.rvm/rubies/ruby-2.1.5/var
sharedstatedir = /var/www/.rvm/rubies/ruby-2.1.5/com
sysconfdir = /etc
datadir = /var/www/.rvm/rubies/ruby-2.1.5/share
datarootdir = /var/www/.rvm/rubies/ruby-2.1.5/share
libexecdir = /var/www/.rvm/rubies/ruby-2.1.5/libexec
sbindir = /var/www/.rvm/rubies/ruby-2.1.5/sbin
bindir = /var/www/.rvm/rubies/ruby-2.1.5/bin
exec_prefix = /var/www/.rvm/rubies/ruby-2.1.5
PACKAGE_URL =
PACKAGE_BUGREPORT =
PACKAGE_STRING =
PACKAGE_VERSION =
PACKAGE_TARNAME =
PACKAGE_NAME =
PATH_SEPARATOR = :
SHELL = /bin/bash
archdir = /var/www/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/x86_64-linux
topdir = /var/www/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/x86_64-linux
Okay, I figured it out, so here it is for anyone else who types in the corresponding search query ... the problem is indicated with the fact that the load is coming from the "system" passenger module, rather than the passenger module in the RVM gemset.
As many other websites will tell you, one way to address this is to change the value of PassengerRoot in your apache.conf file to point to where your installed gem is, in the corresponding Ruby you're using for your app. Something like:
PassengerRoot /home/myhome/.rvm/gems/ruby-2.5.1/gems/passenger-4.0.57
will get rid of this problem.

Redmine 2.4.4 - Web application could not be started

I am running Redmine version 2.4.4 on RHEL 6. It works well, but this morning when I checked it, an error did occur.
Web application could not be started
cannot load such file -- bundler/setup (LoadError)
/usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/loader_shared_helpers.rb:245:in `block in run_load_path_setup_code'
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/loader_shared_helpers.rb:348:in `running_bundler'
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/loader_shared_helpers.rb:243:in `run_load_path_setup_code'
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/helper-scripts/rack-preloader.rb:100:in `preload_app'
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/helper-scripts/rack-preloader.rb:158:in `'
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/helper-scripts/rack-preloader.rb:29:in `'
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/helper-scripts/rack-preloader.rb:28:in `'
Application root
/opt/redmine/
Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV and PASSENGER_ENV)
production
Ruby interpreter command
/usr/local/bin/ruby
User and groups
uid=48(apache) gid=48(apache) groups=48(apache)
Environment variables
TERM = xterm
PWD = /opt/redmine
LANG = C
SHLVL = 2
_ = /usr/sbin/httpd
PASSENGER_DEBUG_DIR = /tmp/passenger.spawn-debug.XXXXIokuQq
USER = apache
LOGNAME = apache
SHELL = /sbin/nologin
HOME = /var/www
IN_PASSENGER = 1
PYTHONUNBUFFERED = 1
NODE_PATH = /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/node_lib
RAILS_ENV = production
RACK_ENV = production
WSGI_ENV = production
NODE_ENV = production
PASSENGER_APP_ENV = production
RAILS_RELATIVE_URL_ROOT = /redmine
RACK_BASE_URI = /redmine
PASSENGER_BASE_URI = /redmine
HTTPS = on
SERVER_PROTOCOL = HTTP/1.1
General Ruby interpreter information
RUBY_VERSION = 1.9.3
RUBY_PLATFORM = x86_64-linux
RUBY_ENGINE = ruby
RubyGems version = 1.8.23.2
Ruby configuration (RbConfig::CONFIG)
DESTDIR =
MAJOR = 1
MINOR = 9
TEENY = 1
PATCHLEVEL = 547
INSTALL = /usr/bin/install -c
EXEEXT =
prefix = /usr/local
ruby_install_name = ruby
RUBY_INSTALL_NAME = ruby
RUBY_SO_NAME = ruby
exec = exec
ruby_pc = ruby-1.9.pc
PACKAGE = ruby
BUILTIN_TRANSSRCS = newline.c
USE_RUBYGEMS = YES
MANTYPE = doc
NROFF = /usr/bin/nroff
vendorhdrdir = /usr/local/include/ruby-1.9.1/vendor_ruby
sitehdrdir = /usr/local/include/ruby-1.9.1/site_ruby
rubyhdrdir = /usr/local/include/ruby-1.9.1
UNIVERSAL_INTS =
UNIVERSAL_ARCHNAMES =
configure_args =
vendordir = /usr/local/lib/ruby/vendor_ruby
sitedir = /usr/local/lib/ruby/site_ruby
ruby_version = 1.9.1
sitearch = x86_64-linux
arch = x86_64-linux
RI_BASE_NAME = ri
ridir = /usr/local/share/ri
rubylibprefix = /usr/local/lib/ruby
MAKEFILES = Makefile
PLATFORM_DIR =
THREAD_MODEL = pthread
SYMBOL_PREFIX =
EXPORT_PREFIX =
COMMON_HEADERS =
COMMON_MACROS =
COMMON_LIBS =
MAINLIBS =
ENABLE_SHARED = no
DLDLIBS = -lc
SOLIBS =
LIBRUBYARG_SHARED = -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib
LIBRUBYARG_STATIC = -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib -lruby-static
LIBRUBYARG = -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib -lruby-static
LIBRUBY = libruby-static.a
LIBRUBY_ALIASES = libruby.so
LIBRUBY_SO = libruby.so.1.9.1
LIBRUBY_A = libruby-static.a
RUBYW_INSTALL_NAME =
rubyw_install_name =
LIBRUBY_DLDFLAGS =
LIBRUBY_LDSHARED = gcc -shared
EXTDLDFLAGS =
warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
debugflags = -ggdb
optflags = -O3
cxxflags = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
cflags = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
cppflags =
NULLCMD = :
INSTALLDOC = all
CAPITARGET = capi
RDOCTARGET = rdoc
EXECUTABLE_EXTS =
ARCHFILE =
LIBRUBY_RELATIVE = no
EXTOUT = .ext
PREP = miniruby
TEST_RUNNABLE = yes
setup = Setup
EXTSTATIC =
STRIP = strip -S -x
TRY_LINK =
LIBPATHENV = LD_LIBRARY_PATH
RPATHFLAG = -Wl,-R%1$-s
LIBPATHFLAG = -L%1$-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
DOXYGEN = doxygen
DOT =
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
GCC = yes
EGREP = /bin/grep -E
GREP = /bin/grep
CPP = gcc -E
CXXFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
CXX = g++
OBJEXT = o
CPPFLAGS =
LDFLAGS = -L. -rdynamic -Wl,-export-dynamic
CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
CC = gcc
target_os = linux
target_vendor = unknown
target_cpu = x86_64
target = x86_64-unknown-linux-gnu
host_os = linux-gnu
host_vendor = unknown
host_cpu = x86_64
host = x86_64-unknown-linux-gnu
RUBYW_BASE_NAME = rubyw
RUBY_BASE_NAME = ruby
build_os = linux-gnu
build_vendor = unknown
build_cpu = x86_64
build = x86_64-unknown-linux-gnu
RUBY_RELEASE_DATE = 2014-05-14
RUBY_PROGRAM_VERSION = 1.9.3
BASERUBY = ruby
target_alias =
host_alias =
build_alias =
LIBS = -lpthread -lrt -ldl -lcrypt -lm
ECHO_T =
ECHO_N = -n
ECHO_C =
DEFS =
mandir = /usr/local/share/man
localedir = /usr/local/share/locale
libdir = /usr/local/lib
psdir = /usr/local/share/doc/ruby
pdfdir = /usr/local/share/doc/ruby
dvidir = /usr/local/share/doc/ruby
htmldir = /usr/local/share/doc/ruby
infodir = /usr/local/share/info
docdir = /usr/local/share/doc/ruby
oldincludedir = /usr/include
includedir = /usr/local/include
localstatedir = /usr/local/var
sharedstatedir = /usr/local/com
sysconfdir = /usr/local/etc
datadir = /usr/local/share
datarootdir = /usr/local/share
libexecdir = /usr/local/libexec
sbindir = /usr/local/sbin
bindir = /usr/local/bin
exec_prefix = /usr/local
PACKAGE_URL =
PACKAGE_BUGREPORT =
PACKAGE_STRING =
PACKAGE_VERSION =
PACKAGE_TARNAME =
PACKAGE_NAME =
PATH_SEPARATOR = :
SHELL = /bin/sh
rubylibdir = /usr/local/lib/ruby/1.9.1
archdir = /usr/local/lib/ruby/1.9.1/x86_64-linux
sitelibdir = /usr/local/lib/ruby/site_ruby/1.9.1
sitearchdir = /usr/local/lib/ruby/site_ruby/1.9.1/x86_64-linux
vendorlibdir = /usr/local/lib/ruby/vendor_ruby/1.9.1
vendorarchdir = /usr/local/lib/ruby/vendor_ruby/1.9.1/x86_64-linux
topdir = /usr/local/lib/ruby/1.9.1/x86_64-linux
Ruby load path ($LOAD_PATH)
/usr/local/lib/ruby/site_ruby/1.9.1
/usr/local/lib/ruby/site_ruby/1.9.1/x86_64-linux
/usr/local/lib/ruby/site_ruby
/usr/local/lib/ruby/vendor_ruby/1.9.1
/usr/local/lib/ruby/vendor_ruby/1.9.1/x86_64-linux
/usr/local/lib/ruby/vendor_ruby
/usr/local/lib/ruby/1.9.1
/usr/local/lib/ruby/1.9.1/x86_64-linux
Ruby loaded libraries ($LOADED_FEATURES)
enumerator.so
/usr/local/lib/ruby/1.9.1/x86_64-linux/enc/encdb.so
/usr/local/lib/ruby/1.9.1/x86_64-linux/enc/trans/transdb.so
/usr/local/lib/ruby/1.9.1/rubygems/defaults.rb
/usr/local/lib/ruby/1.9.1/x86_64-linux/rbconfig.rb
/usr/local/lib/ruby/1.9.1/rubygems/deprecate.rb
/usr/local/lib/ruby/1.9.1/rubygems/exceptions.rb
/usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb
/usr/local/lib/ruby/1.9.1/rubygems.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger.rb
/usr/local/lib/ruby/1.9.1/x86_64-linux/etc.so
/usr/local/lib/ruby/1.9.1/fileutils.rb
/usr/local/lib/ruby/1.9.1/tmpdir.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/utils/tmpio.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/platform_info.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/platform_info/operating_system.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/platform_info/ruby.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/platform_info/binary_compatibility.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/buildout/ruby/ruby-1.9.3-x86_64-linux/passenger_native_support.so
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/native_support.rb
/usr/local/lib/ruby/1.9.1/x86_64-linux/socket.so
/usr/local/lib/ruby/1.9.1/socket.rb
/usr/local/lib/ruby/1.9.1/thread.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/ruby_core_enhancements.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/utils/tmpdir.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/preloader_shared_helpers.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/constants.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/public_api.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/debug_logging.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/loader_shared_helpers.rb
/usr/local/lib/ruby/1.9.1/x86_64-linux/fcntl.so
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/message_channel.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/utils.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/message_client.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/utils/native_support_utils.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/utils/unseekable_socket.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/request_handler/thread_handler.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/request_handler.rb
/usr/local/lib/ruby/1.9.1/x86_64-linux/stringio.so
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/utils/tee_input.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/rack/thread_handler_extension.rb
/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/lib/phusion_passenger/analytics_logger.rb
/usr/local/lib/ruby/1.9.1/rubygems/version.rb
/usr/local/lib/ruby/1.9.1/rubygems/requirement.rb
/usr/local/lib/ruby/1.9.1/rubygems/platform.rb
/usr/local/lib/ruby/1.9.1/rubygems/specification.rb
/usr/local/lib/ruby/1.9.1/rubygems/path_support.rb
Powered by Phusion Passenger, mod_rails / mod_rack for Apache and Nginx.
In file httpd.conf, i did not change anything from this:
<pre>
LoadModule passenger_module /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38
PassengerDefaultRuby /usr/local/bin/ruby
</IfModule>
</pre>
I did not install RVM
$ gem evn
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.8
- /root/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
$gem list
*** LOCAL GEMS ***
actionmailer (3.2.17)
actionpack (3.2.17)
activemodel (3.2.17)
activerecord (3.2.17)
activeresource (3.2.17)
activesupport (3.2.17)
arel (5.0.1.20140414130214, 3.0.3)
builder (3.2.2, 3.0.0)
bundler (1.6.5, 1.3.0)
coderay (1.1.0)
erubis (2.7.0)
fastercsv (1.5.5)
hashie (3.2.0)
hike (1.2.3)
hodel_3000_compliant_logger (0.1.1)
i18n (0.6.9)
journey (1.0.4)
jquery-rails (2.0.3)
json (1.8.1)
mail (2.6.1, 2.5.4)
mime-types (1.25.1)
multi_json (1.10.1, 1.9.0)
mysql2 (0.3.15)
net-ldap (0.3.1)
omniauth (1.2.2)
omniauth-shibboleth (1.1.2)
orm_adapter (0.5.0)
polyglot (0.3.5, 0.3.4)
rack (1.5.2, 1.4.5)
rack-cache (1.2)
rack-ssl (1.4.1, 1.3.3)
rack-test (0.6.2)
railties (3.2.17)
rake (10.3.2, 10.1.1, 0.8.7)
rdoc (4.1.1, 3.12.2)
rdoc-data (4.0.1)
shibboleth_auth (0.3.3)
sprockets (2.12.1, 2.2.2)
thor (0.18.1)
thread_safe (0.3.4)
tilt (2.0.1, 1.4.1)
treetop (1.5.3, 1.4.15)
tzinfo (1.2.1, 0.3.39)
warden (1.2.3)
$ ruby -v
<pre>
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
</pre>
<pre>
$ which bundler
/usr/bin/bundler
$ which ruby
/usr/bin/ruby
$ which gem
/usr/bin/gem
I could not re-install Redmine because other users are using it.
Please give any idea to solve this problem.
The paths indicate different versions of Ruby in use.
When you run ruby -v from the command line, it's showing 1.8.7
Your PassengerRoot indicates 2.0.0 in /usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38 (the directory under gems indicates the Ruby version the gem is built for)
The error message at the top indicates RUBY_VERSION = 1.9.3
Your best course of action is probably to uninstall the unneeded Ruby versions, then reinstall Passenger and Redmine.
Your passenger use other ruby version then in terminal. So, as i see, passenger use /usr/local/bin/ruby.
Try to install bundler in this ruby /usr/local/bin/gem install bundler.
And then i think you must run /usr/local/bin/bundle install from redmine root path

Rails Phusion Passenger error after updates

I updated to rails 3.2.17 from 3.2.1. When I run bundle update and bundle install, everything passes with no errors or warnings. Then I restart my server, and when I load my site, I get the PASSENGER: WEB APPLICATION COULD NOT BE STARTED page. Below is a copy of everything listed on that page. Any ideas what I might need to change or check to get things running?
It looks like Bundler could not find a gem. Maybe you didn't install all the gems that this application needs. To install your gems, please run:
bundle install
If that didn't work, then the problem is probably caused by your application being run under a different environment than it's supposed to. Please check the following:
Is this app supposed to be run as the root user?
Is this app being run on the correct Ruby interpreter? Below you will see which Ruby interpreter Phusion Passenger attempted to use.
-------- The exception is as follows: -------
Could not find rake-10.2.1 in any of the sources (Bundler::GemNotFound)
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/spec_set.rb:92:in `block in materialize'
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/spec_set.rb:85:in `map!'
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/spec_set.rb:85:in `materialize'
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/definition.rb:133:in `specs'
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/definition.rb:178:in `specs_for'
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/definition.rb:167:in `requested_specs'
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/environment.rb:18:in `requested_specs'
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/runtime.rb:13:in `setup'
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler.rb:119:in `setup'
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/setup.rb:17:in `<top (required)>'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `require'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/loader_shared_helpers.rb:245:in `block in run_load_path_setup_code'
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/loader_shared_helpers.rb:348:in `running_bundler'
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/loader_shared_helpers.rb:243:in `run_load_path_setup_code'
/var/lib/gems/1.9.1/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:100:in `preload_app'
/var/lib/gems/1.9.1/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:158:in `<module:App>'
/var/lib/gems/1.9.1/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/var/lib/gems/1.9.1/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:28:in `<main>'
Application root
/srv/engdb
Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV and PASSENGER_ENV)
development
Ruby interpreter command
/usr/bin/ruby1.9.1
User and groups
uid=0(root) gid=0(root) groups=0(root)
Environment variables
APACHE_PID_FILE = /var/run/apache2.pid
SHELL = /bin/bash
APACHE_RUN_USER = www-data
PASSENGER_DEBUG_DIR = /tmp/passenger.spawn-debug.XXXX7bmK0b
USER = root
APACHE_LOG_DIR = /var/log/apache2
PATH = /usr/local/bin:/usr/bin:/bin
PWD = /srv/engdb
APACHE_RUN_GROUP = www-data
LANG = C
SHLVL = 0
HOME = /root
LOGNAME = root
APACHE_LOCK_DIR = /var/lock/apache2
APACHE_RUN_DIR = /var/run/apache2
IN_PASSENGER = 1
PYTHONUNBUFFERED = 1
NODE_PATH = /var/lib/gems/1.9.1/gems/passenger-4.0.37/node_lib
RAILS_ENV = development
RACK_ENV = development
WSGI_ENV = development
NODE_ENV = development
PASSENGER_APP_ENV = development
SERVER_PROTOCOL = HTTP/1.1
SERVER_SOFTWARE = Apache/2.2.22 (Ubuntu)
DOCUMENT_ROOT = /srv/engdb/public/
SERVER_ADMIN = [no address given]
QUERY_STRING =
SERVER_NAME = engdatabase
REMOTE_PORT = 53900
REMOTE_ADDR = 192.168.201.14
SERVER_PORT = 80
REQUEST_METHOD = GET
SERVER_ADDR = 192.168.201.89
REQUEST_URI = /
GEM_PATH = /var/lib/gems/1.9.1:/root/.gem/ruby/1.9.1
GEM_HOME = /var/lib/gems/1.9.1
Ulimits
Unknown
System memory usage
total used free shared buffers cached
Mem: 2001 1674 327 0 198 704
-/+ buffers/cache: 772 1229
Swap: 2044 7 2037
General Ruby interpreter information
RUBY_VERSION = 1.9.3
RUBY_PLATFORM = x86_64-linux
RUBY_ENGINE = ruby
RubyGems version = 1.8.11
Ruby configuration (RbConfig::CONFIG)
DESTDIR =
MAJOR = 1
MINOR = 9
TEENY = 1
PATCHLEVEL = 0
INSTALL = /usr/bin/install -c
EXEEXT =
prefix = /usr
ruby_install_name = ruby1.9.1
RUBY_INSTALL_NAME = ruby1.9.1
RUBY_SO_NAME = ruby-1.9.1
exec = exec
ruby_pc = ruby-1.9.pc
PACKAGE = ruby
BUILTIN_TRANSSRCS = newline.c
USE_RUBYGEMS = YES
MANTYPE = doc
NROFF = /usr/bin/nroff
vendorhdrdir = /usr/include/ruby-1.9.1/vendor_ruby
sitehdrdir = /usr/include/ruby-1.9.1/site_ruby
rubyhdrdir = /usr/include/ruby-1.9.1
UNIVERSAL_INTS =
UNIVERSAL_ARCHNAMES =
configure_args = '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=/usr/include' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=/usr/lib/ruby1.9.1' '--srcdir=.' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-silent-rules' '--enable-pthread' '--enable-shared' '--disable-rpath' '--disable-install-doc' '--with-vendordir=/usr/lib/ruby/vendor_ruby' '--with-sitedir=/usr/local/lib/site_ruby' '--program-suffix=1.9.1' '--with-soname=ruby-1.9.1' '--with-baseruby=/usr/bin/ruby1.8' '--enable-ipv6' '--with-dbm-type=gdbm_compat' '--with-tklib=tk8.4' '--with-tcllib=tcl8.4' '--with-tcl-include=/usr/include/tcl8.4' '--with-bundled-sha1' '--with-bundled-md5' '--with-bundled-rmd160' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-fno-strict-aliasing -g -g -O2' 'LDFLAGS=' 'CPPFLAGS=' 'CXXFLAGS=-fno-strict-aliasing -g'
vendordir = /usr/lib/ruby/vendor_ruby
sitedir = /usr/local/lib/site_ruby
ruby_version = 1.9.1
sitearch = x86_64-linux
arch = x86_64-linux
RI_BASE_NAME = ri
ridir = /usr/share/ri
rubylibprefix = /usr/lib/ruby
MAKEFILES = Makefile
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-1.9.1
LIBRUBYARG_STATIC = -lruby-1.9.1-static
LIBRUBYARG = -lruby-1.9.1
LIBRUBY = libruby-1.9.1.so.1.9.1
LIBRUBY_ALIASES = libruby-1.9.1.so.1.9 libruby-1.9.1.so
LIBRUBY_SO = libruby-1.9.1.so.1.9.1
LIBRUBY_A = libruby-1.9.1-static.a
RUBYW_INSTALL_NAME =
rubyw_install_name =
LIBRUBY_DLDFLAGS = -Wl,-soname,libruby-1.9.1.so.1.9
LIBRUBY_LDSHARED = gcc -shared
warnflags = -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration
debugflags = -ggdb
optflags = -O3
cxxflags = -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration
cflags = -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration
cppflags =
NULLCMD = :
INSTALLDOC = nodoc
CAPITARGET = nodoc
RDOCTARGET = nodoc
EXECUTABLE_EXTS =
ARCHFILE =
LIBRUBY_RELATIVE = no
EXTOUT = .ext
PREP = miniruby
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 =
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 =
DOXYGEN =
DOT =
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 = objcopy
OBJDUMP = objdump
ASFLAGS =
AS = as
AR = ar
RANLIB = ranlib
try_header =
COUTFLAG = -o
OUTFLAG = -o
CPPOUTFILE = -o conftest.i
GNU_LD = yes
GCC = yes
EGREP = /bin/grep -E
GREP = /bin/grep
CPP = gcc -E
CXXFLAGS = -fno-strict-aliasing -g
CXX = g++
OBJEXT = o
CPPFLAGS =
LDFLAGS = -L. -rdynamic -Wl,-export-dynamic
CFLAGS = -fno-strict-aliasing -g -g -O2 -fPIC
CC = gcc
target_os = linux
target_vendor = pc
target_cpu = x86_64
target = x86_64-pc-linux-gnu
host_os = linux-gnu
host_vendor = pc
host_cpu = x86_64
host = x86_64-pc-linux-gnu
RUBYW_BASE_NAME = rubyw
RUBY_BASE_NAME = ruby
build_os = linux-gnu
build_vendor = pc
build_cpu = x86_64
build = x86_64-pc-linux-gnu
RUBY_RELEASE_DATE = 2011-10-30
RUBY_PROGRAM_VERSION = 1.9.3
BASERUBY = /usr/bin/ruby1.8
target_alias =
host_alias =
build_alias = x86_64-linux-gnu
LIBS = -lpthread -lrt -ldl -lcrypt -lm
ECHO_T =
ECHO_N = -n
ECHO_C =
DEFS =
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/ruby1.9.1
sbindir = /usr/sbin
bindir = /usr/bin
program_transform_name = s&$&1.9.1&;s&^&&
exec_prefix = /usr
PACKAGE_URL =
PACKAGE_BUGREPORT =
PACKAGE_STRING =
PACKAGE_VERSION =
PACKAGE_TARNAME =
PACKAGE_NAME =
PATH_SEPARATOR = :
SHELL = /bin/bash
rubylibdir = /usr/lib/ruby/1.9.1
archdir = /usr/lib/ruby/1.9.1/x86_64-linux
sitelibdir = /usr/local/lib/site_ruby/1.9.1
sitearchdir = /usr/local/lib/site_ruby/1.9.1/x86_64-linux
vendorlibdir = /usr/lib/ruby/vendor_ruby/1.9.1
vendorarchdir = /usr/lib/ruby/vendor_ruby/1.9.1/x86_64-linux
topdir = /usr/lib/ruby/1.9.1/x86_64-linux
Activated Ruby gems
bundler => 1.5.2
Ruby load path ($LOAD_PATH)
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib
/usr/local/lib/site_ruby/1.9.1
/usr/local/lib/site_ruby/1.9.1/x86_64-linux
/usr/local/lib/site_ruby
/usr/lib/ruby/vendor_ruby/1.9.1
/usr/lib/ruby/vendor_ruby/1.9.1/x86_64-linux
/usr/lib/ruby/vendor_ruby
/usr/lib/ruby/1.9.1
/usr/lib/ruby/1.9.1/x86_64-linux
Ruby loaded libraries ($LOADED_FEATURES)
enumerator.so
/usr/lib/ruby/1.9.1/x86_64-linux/enc/encdb.so
/usr/lib/ruby/1.9.1/x86_64-linux/enc/trans/transdb.so
/usr/lib/ruby/1.9.1/rubygems/defaults.rb
/usr/lib/ruby/1.9.1/x86_64-linux/rbconfig.rb
/usr/lib/ruby/1.9.1/rubygems/deprecate.rb
/usr/lib/ruby/1.9.1/rubygems/exceptions.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb
/usr/lib/ruby/1.9.1/rubygems.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger.rb
/usr/lib/ruby/1.9.1/x86_64-linux/etc.so
/usr/lib/ruby/1.9.1/fileutils.rb
/usr/lib/ruby/1.9.1/tmpdir.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/utils/tmpio.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/platform_info.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/platform_info/operating_system.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/platform_info/ruby.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/platform_info/binary_compatibility.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/buildout/ruby/ruby-1.9.3-x86_64-linux/passenger_native_support.so
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/native_support.rb
/usr/lib/ruby/1.9.1/x86_64-linux/socket.so
/usr/lib/ruby/1.9.1/socket.rb
/usr/lib/ruby/1.9.1/thread.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/ruby_core_enhancements.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/utils/tmpdir.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/preloader_shared_helpers.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/constants.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/public_api.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/debug_logging.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/loader_shared_helpers.rb
/usr/lib/ruby/1.9.1/x86_64-linux/fcntl.so
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/message_channel.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/utils.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/message_client.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/utils/native_support_utils.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/utils/unseekable_socket.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/request_handler/thread_handler.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/request_handler.rb
/usr/lib/ruby/1.9.1/x86_64-linux/stringio.so
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/utils/tee_input.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/rack/thread_handler_extension.rb
/var/lib/gems/1.9.1/gems/passenger-4.0.37/lib/phusion_passenger/analytics_logger.rb
/usr/lib/ruby/1.9.1/rubygems/version.rb
/usr/lib/ruby/1.9.1/rubygems/requirement.rb
/usr/lib/ruby/1.9.1/rubygems/platform.rb
/usr/lib/ruby/1.9.1/rubygems/specification.rb
/usr/lib/ruby/1.9.1/rubygems/path_support.rb
/usr/lib/ruby/1.9.1/rubygems/dependency.rb
/usr/lib/ruby/1.9.1/x86_64-linux/pathname.so
/usr/lib/ruby/1.9.1/pathname.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/constants.rb
/usr/lib/ruby/1.9.1/rubygems/config_file.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/rubygems_integration.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/current_ruby.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/shared_helpers.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/gem_path_manipulation.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/gem_helpers.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/match_platform.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/rubygems_ext.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/version.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/settings.rb
/usr/lib/ruby/1.9.1/x86_64-linux/digest.so
/usr/lib/ruby/1.9.1/digest.rb
/usr/lib/ruby/1.9.1/x86_64-linux/digest/sha1.so
/usr/lib/ruby/1.9.1/set.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/definition.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/dependency.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/ruby_dsl.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/dsl.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/source.rb
/usr/lib/ruby/1.9.1/uri/common.rb
/usr/lib/ruby/1.9.1/uri/generic.rb
/usr/lib/ruby/1.9.1/uri/ftp.rb
/usr/lib/ruby/1.9.1/uri/http.rb
/usr/lib/ruby/1.9.1/uri/https.rb
/usr/lib/ruby/1.9.1/uri/ldap.rb
/usr/lib/ruby/1.9.1/uri/ldaps.rb
/usr/lib/ruby/1.9.1/uri/mailto.rb
/usr/lib/ruby/1.9.1/uri.rb
/usr/lib/ruby/1.9.1/rubygems/user_interaction.rb
/usr/lib/ruby/1.9.1/rubygems/remote_fetcher.rb
/usr/lib/ruby/1.9.1/rubygems/errors.rb
/usr/lib/ruby/1.9.1/rubygems/text.rb
/usr/lib/ruby/1.9.1/rubygems/spec_fetcher.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/source/rubygems.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/source/path.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/source/git.rb
/usr/lib/ruby/1.9.1/x86_64-linux/strscan.so
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/lockfile_parser.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/lazy_specification.rb
/usr/lib/ruby/1.9.1/tsort.rb
/usr/lib/ruby/1.9.1/forwardable.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/spec_set.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/environment.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/runtime.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/index.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/remote_specification.rb
/var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/endpoint_specification.rb
/usr/lib/ruby/1.9.1/erb.rb
Here is my gem file
source 'https://rubygems.org'
gem 'rails', '3.2.17'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
gem 'delayed_job_active_record'
gem 'handles_sortable_columns'
gem 'will_paginate', '~> 3.0.5'
gem 'forem', :github => "radar/forem", :branch => "rails3"
gem 'forem-bootstrap', :github => "radar/forem-bootstrap"
Your application is running as root, using system ruby, and you probably installed the gems as a different user, with a different ruby installation, i.e under rvm or rbenv.
The simplest solution would be to run bundle install as root. Good luck!

Resources