Web应用程序无法启动

我在RHEL 6上运行Redmine 2.4.4版。它运行良好,但今天早上当我检查它时,确实发生了错误。

    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>

我没有安装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

我无法重新安装Redmine,因为其他用户正在使用它。

请给出任何想法来解决这个问题。


路径指示使用的不同版本的Ruby。

  • 当你从命令行运行ruby -v ,它显示1.8.7
  • 你的PassengerRoot/usr/local/lib/ruby/gems/2.0.0/gems/passenger-4.0.38表示为2.0.0( gems下的目录表示gem的编译版本)
  • 顶部的错误消息表示RUBY_VERSION = 1.9.3
  • 您的最佳行动方案可能是卸载不需要的Ruby版本,然后重新安装Passenger和Redmine。


    您的乘客在终端使用其他红宝石版本。 所以,如我所见,乘客使用/ usr / local / bin / ruby​​。

    尝试在这个ruby /usr/local/bin/gem install bundler

    然后我认为你必须从redmine根路径运行/usr/local/bin/bundle install

    链接地址: http://www.djcxy.com/p/63329.html

    上一篇: Web application could not be started

    下一篇: ruby 1.9.1 error after installing compass gems