Ngnix Passanger Ruby无法加载此类文件-捆绑程序/安装程序(LoadError)

时间:2019-02-08 18:30:23

标签: ruby-on-rails nginx passenger

我正在尝试在我的ngnix服务器上安装Ruby Rails应用程序,但是安装后:Redis,NodeJs,Ruby,Postgres,Passenger仍然显示

root      2392  0.0  0.0    196     4 ?        S    17:53   0:00 s6-supervise plex
HOMEUSER     2394  0.0  0.0   4504   752 ?        Ss   17:53   0:00 /bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver:/usr/lib/plexmediaserver/lib /usr/lib/plexmediaserver/Plex\ Media\ Server
HOMEUSER     2402  1.6  0.5 707684 91316 ?        Sl   17:53   2:47 /usr/lib/plexmediaserver/Plex Media Server
HOMEUSER     2458  0.1  0.3 1791280 55380 ?       SNl  17:53   0:17 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-cc260c476/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py --server-version 1.14.1.5488-cc260c476 /usr/lib/plexmediaserver/Resources/Plug-ins-cc260c476/System.bundle
HOMEUSER     3134  0.2  0.1 373108 22540 ?        Sl   17:53   0:22 /usr/lib/plexmediaserver/Plex DLNA Server
HOMEUSER     3137  0.0  0.0 372964 15276 ?        Sl   17:53   0:00 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.14.1.5488-cc260c476 32600 /waitmutex
HOMEUSER     6382  0.0  0.0   7980   896 pts/1    S+   20:45   0:00 grep --color=auto lex

我有以下设置:

/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler/setup (LoadError)
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /var/www/umbrella/config/boot.rb:3:in `<top (required)>'
from bin/rails:3:in `require_relative'
from bin/rails:3:in `<main>'

返回

gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 2.7.6
  - RUBY VERSION: 2.5.1 (2018-03-29 patchlevel 57) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/work/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0
  - USER INSTALLATION DIRECTORY: /home/work/.gem/ruby/2.5.0
  - RUBY EXECUTABLE: /home/work/.rbenv/versions/2.5.1/bin/ruby
  - EXECUTABLE DIRECTORY: /home/work/.rbenv/versions/2.5.1/bin
  - SPEC CACHE DIRECTORY: /home/work/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /home/work/.rbenv/versions/2.5.1/etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /home/work/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0
     - /home/work/.gem/ruby/2.5.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /home/work/.rbenv/versions/2.5.1/bin
     - /home/work/.rbenv/libexec
     - /home/work/.rbenv/plugins/ruby-build/bin
     - /home/work/bin
     - /home/work/.local/bin
     - /home/work/.rbenv/plugins/ruby-build/bin
     - /home/work/.rbenv/shims
     - /home/work/.rbenv/bin
     - /usr/local/sbin
     - /usr/local/bin
     - /usr/sbin
     - /usr/bin
     - /sbin
     - /bin
     - /usr/games
     - /usr/local/games
     - /snap/bin
ruby -rbundler -e 'puts $LOAD_PATH'

和passanger配置文件:

/home/work/.rbenv/rbenv.d/exec/gem-rehash
/home/work/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/did_you_mean-1.2.0/lib
/home/work/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.4/lib
/home/work/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0
/home/work/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/x86_64-linux
/home/work/.rbenv/versions/2.5.1/lib/ruby/site_ruby
/home/work/.rbenv/versions/2.5.1/lib/ruby/vendor_ruby/2.5.0
/home/work/.rbenv/versions/2.5.1/lib/ruby/vendor_ruby/2.5.0/x86_64-linux
/home/work/.rbenv/versions/2.5.1/lib/ruby/vendor_ruby
/home/work/.rbenv/versions/2.5.1/lib/ruby/2.5.0
/home/work/.rbenv/versions/2.5.1/lib/ruby/2.5.0/x86_64-linux
/etc/nginx/passenger.conf

如果我运行

passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
passenger_ruby /home/work/.rbenv/versions/2.5.1/bin/ruby;
#passenger_ruby /usr/bin/passenger_free_ruby;

我会康复

which passenger-config

/usr/bin/passenger-config
/usr/bin/passenger-config  --ruby-command

我检查了乘客的官方文件,并按照他们的步骤进行操作,但是仍然无法通过此操作

有什么想法吗?

谢谢!

0 个答案:

没有答案