Я пытаюсь развернуть приложение ROR на сервере Ubuntu (EC2). Я использую следующие версии:
- Ruby: 2.4.0p0
- Rails: 4.2.8
- Bundler: 1.17.3
* Почему-то мой коллега создал gemset вместо обычной настройки.
enm gem:
RubyGems Environment:
- RUBYGEMS VERSION: 2.6.8
- RUBY VERSION: 2.4.0 (2016-12-24 patchlevel 0) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/ubuntu/.rvm/gems/ruby-2.4.0@myrepo
- USER INSTALLATION DIRECTORY: /home/ubuntu/.gem/ruby/2.4.0
- RUBY EXECUTABLE: /home/ubuntu/.rvm/rubies/ruby-2.4.0/bin/ruby
- EXECUTABLE DIRECTORY: /home/ubuntu/.rvm/gems/ruby-2.4.0@myrepo/bin
- SPEC CACHE DIRECTORY: /home/ubuntu/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/ubuntu/.rvm/gems/ruby-2.4.0@myrepo
- /home/ubuntu/.rvm/gems/ruby-2.4.0@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /home/ubuntu/.rvm/gems/ruby-2.4.0@myrepo/bin
- /home/ubuntu/.rvm/gems/ruby-2.4.0@global/bin
- /home/ubuntu/.rvm/rubies/ruby-2.4.0/bin
- /home/ubuntu/.rvm/bin
- /home/ubuntu/bin
- /home/ubuntu/.local/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /usr/games
- /usr/local/games
- /snap/bin
Я выполнил настройку nginx и passenger и установил root путей.
- nginx версия: nginx / 1.17.3
- Phusion Passenger: 6.0.4
Я считаю, что есть ничего плохого в nginx и настройках пассажира, но я получаю следующую ошибку: Сервер приложений Phusion Passenger попытался запустить веб-приложение. Но само приложение (а не Пассажир) обнаружило внутреннюю ошибку.
Сведения об ошибке:
cannot load such file -- bundler/setup (LoadError)
/home/ubuntu/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/home/ubuntu/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:363:in `activate_gem'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:221:in `block in run_load_path_setup_code'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:527:in `running_bundler'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:220:in `run_load_path_setup_code'
/usr/share/passenger/helper-scripts/rack-preloader.rb:91:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:189:in `block in <module:App>'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:380:in `run_block_and_record_step_progress'
/usr/share/passenger/helper-scripts/rack-preloader.rb:188:in `<module:App>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'
Вывод stdout / stderr подпроцесса до сих пор:
[passenger_native_support.so] trying to compile for the current user (nobody) and Ruby interpreter...
(set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
Warning: compilation didn't succeed. To learn why, read this file:
/tmp/passenger_native_support-18gfm98.log
[passenger_native_support.so] finding downloads for the current Ruby interpreter...
(set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)
Could not download https://github.com/phusion/passenger/releases/download/release-6.0.4/rubyext-ruby-2.4.0-x86_64-linux.tar.gz: The requested URL returned error: 404 Not Found
Trying next mirror...
Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/6.0.4/rubyext-ruby-2.4.0-x86_64-linux.tar.gz: The requested URL returned error: 404 Not Found
Trying next mirror...
Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/6.0.4/rubyext-ruby-2.4.0-x86_64-linux.tar.gz: The requested URL returned error: 403 Forbidden
[passenger_native_support.so] will not be used (can't compile or download)
--> Passenger will still operate normally.
Error: The application encountered the following error: cannot load such file -- bundler/setup (LoadError)
/home/ubuntu/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/home/ubuntu/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:363:in `activate_gem'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:221:in `block in run_load_path_setup_code'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:527:in `running_bundler'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:220:in `run_load_path_setup_code'
/usr/share/passenger/helper-scripts/rack-preloader.rb:91:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:189:in `block in <module:App>'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:380:in `run_block_and_record_step_progress'
/usr/share/passenger/helper-scripts/rack-preloader.rb:188:in `<module:App>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'
У кого-нибудь есть идеи?