Пассажир не может загрузить жемчужину кофе-рельсов - PullRequest
0 голосов
/ 26 сентября 2019

Я пытаюсь преобразовать свое приложение из веб-сервера Ruby on Rails и вместо этого использую Apache + Passenger.Кажется, мне труднее всего добиться этого.В настоящее время я получаю следующую ошибку при переходе на мой сайт, на котором работает Apache + Passenger:

App 31495 output:  [passenger_native_support.so] trying to compile for the current user (nobody) and Ruby interpreter...
App 31495 output:      (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
App 31495 output:      Warning: compilation didn't succeed. To learn why, read this file:
App 31495 output:      /tmp/passenger_native_support-1p5ww5z.log
App 31495 output:  [passenger_native_support.so] finding downloads for the current Ruby interpreter...
App 31495 output:      (set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)
App 31495 output:      Could not download https://github.com/phusion/passenger/releases/download/release-6.0.2/rubyext-ruby-2.5.1-x86_64-linux.tar.gz: 2019-09-26 10:17:17 ERROR 404: Not Found.
App 31495 output:      Trying next mirror...
App 31495 output:      Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/6.0.2/rubyext-ruby-2.5.1-x86_64-linux.tar.gz: 2019-09-26 10:17:17 ERROR 404: Not Found.
App 31495 output:      Trying next mirror...
App 31495 output:      Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/6.0.2/rubyext-ruby-2.5.1-x86_64-linux.tar.gz: 2019-09-26 10:17:17 ERROR 403: Forbidden.
App 31495 output:  [passenger_native_support.so] will not be used (can't compile or download)
App 31495 output:   --> Passenger will still operate normally.
App 31495 output: Error: The application encountered the following error: There was an error while trying to load the gem 'coffee-rails'.
App 31495 output: Gem Load Error is: HOME environment variable (or HOMEDRIVE and HOMEPATH) must be set and point to a directory
<snipped>

Первое, что мне нужно было сделать, это добавить:

PassengerRuby /usr/local/rvm/gems/ruby-2.5.1/wrappers/ruby

к моемуКонфигурация apache, и теперь я получаю эту ошибку, которая, похоже, связана с гемом coffee-rails, но я понятия не имею, что мне нужно с этим делать.

Что мне нужно сделать, чтобы получить этоработает?

Согласно этому сообщению, Gem 'coffee-rails' Ошибка загрузки: необходимо установить переменную среды HOME (или HOMEDRIVE и HOMEPATH) и указать на каталог , проблема была вего rb-readline и предложение было удалить это.Я попытался удалить это из моего gemfile, и произошла следующая ошибка:

[ E 2019-09-26 10:25:32.5273 31834/Th age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /var/www/vpentest: The application encountered the following error: You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.

If this is a development machine, remove the /var/www/vpentest/Gemfile freeze
by running `bundle install --no-deployment`.

You have deleted from the Gemfile:
* rb-readline
 (Bundler::ProductionError)
  Error ID: 7b2f2a89
  Error details saved to: /tmp/passenger-error-Nd6b5y.html

[ E 2019-09-26 10:25:32.5302 31834/T9 age/Cor/Con/CheckoutSession.cpp:276 ]: [Client 1-2] Cannot checkout session because a spawning error occurred. The identifier of the error is 7b2f2a89. Please see earlier logs for details about the error.

Хорошо, поэтому я пытаюсь запустить bundle install, и затем я получаю эту ошибку:

Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
Your Gemfile lists the gem wicked_pdf (>= 0) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once (per group).
While it's not a problem now, it could cause errors if you change the version of one of them later.
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.

If this is a development machine, remove the /var/www/vpentest/Gemfile freeze
by running `bundle install --no-deployment`.

You have deleted from the Gemfile:
* rb-readline

, котораязаставляет меня снова застрять, и я не могу понять, как пройти через это или если попытка устранить эту ошибку даже необходима из-за другой проблемы.

1 Ответ

0 голосов
/ 26 сентября 2019

Не уверен, что это лучший ответ, но мне удалось удалить гем из Gemfile из другого экземпляра приложения, запустить там bundle install, а затем скопировать приложение обратно в каталог /var/www/.Я абсолютно не знаю, почему это было необходимо, но это сработало.

Следующий набор вопросов, с которыми я столкнулся, касался разрешений, поэтому я просто дал www-data право собственности на весь каталог rails.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...