Jogi1j / redmine_closes_resolved_issues

Redmine Closes Resolved Issues plugin
10 stars 5 forks source link

Nginx Passenger #2

Open LeDistordu opened 9 years ago

LeDistordu commented 9 years ago

I have a problem with my setup = Redmine 3.0.1 + Nginx & Passenger

App 15257 stdout: App 15257 stdout: [ 2015-04-08 15:28:57.0878 15177/7f5bc958e700 App/Implementation.cpp:287 ]: Could not spawn process for application /var/redmine: An error occured while starting up the preloader. Error ID: 91a2bd8f Error details saved to: /tmp/passenger-error-iwNbGK.html Message from application:

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 maybe the problem is that your gems are installed to /var/www/.rvm/gems, while at the same time you set PassengerRuby (Apache) or passenger_ruby (Nginx) to /usr/local/rvm/gems/ruby-2.0.0-p643/wrappers/ruby. Because of the latter, RVM does not load gems from the home directory.

To make RVM load gems from the home directory, you need to set PassengerRuby/passenger_ruby to an RVM wrapper script inside the home directory:

  1. Login as www-data.
  2. Enable RVM mixed mode by running:
    rvm user gemsets
  3. Run this to find out what to set PassengerRuby/passenger_ruby to:
    /usr/local/rvm/gems/ruby-2.0.0-p643/wrappers/ruby \
    /usr/local/rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.6/bin/passenger-config --detect-ruby

If that didn't help either, then maybe your application is being run under a different environment than it's supposed to. Please check the following:

  1. Is this app supposed to be run as the www-data user?
  2. Is this app being run on the correct Ruby interpreter? Below you will see which Ruby interpreter Phusion Passenger attempted to use.
  3. Please check whether the correct RVM gemset is being used.
  4. Sometimes, RVM gemsets may be broken. Try resetting them.

-------- The exception is as follows: -------

Could not find rufus-scheduler-3.0.9 in any of the sources (Bundler::GemNotFound)

  /usr/local/rvm/gems/ruby-2.0.0-p643/gems/bundler-1.9.2/lib/bundler/spec_set.rb:92:in `block in materialize'
  /usr/local/rvm/gems/ruby-2.0.0-p643/gems/bundler-1.9.2/lib/bundler/spec_set.rb:85:in `map!'
  /usr/local/rvm/gems/ruby-2.0.0-p643/gems/bundler-1.9.2/lib/bundler/spec_set.rb:85:in `materialize'
  /usr/local/rvm/gems/ruby-2.0.0-p643/gems/bundler-1.9.2/lib/bundler/definition.rb:132:in `specs'
  /usr/local/rvm/gems/ruby-2.0.0-p643/gems/bundler-1.9.2/lib/bundler/definition.rb:177:in `specs_for'
  /usr/local/rvm/gems/ruby-2.0.0-p643/gems/bundler-1.9.2/lib/bundler/definition.rb:166:in `requested_specs'
  /usr/local/rvm/gems/ruby-2.0.0-p643/gems/bundler-1.9.2/lib/bundler/environment.rb:18:in `requested_specs'
  /usr/local/rvm/gems/ruby-2.0.0-p643/gems/bundler-1.9.2/lib/bundler/runtime.rb:13:in `setup'
  /usr/local/rvm/gems/ruby-2.0.0-p643/gems/bundler-1.9.2/lib/bundler.rb:122:in `setup'
  /usr/local/rvm/gems/ruby-2.0.0-p643/gems/bundler-1.9.2/lib/bundler/setup.rb:18:in `<top (required)>'
  /usr/local/rvm/rubies/ruby-2.0.0-p643/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `require'
  /usr/local/rvm/rubies/ruby-2.0.0-p643/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
  /usr/local/rvm/rubies/ruby-2.0.0-p643/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:39:in `require'
  /usr/local/rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.6/lib/phusion_passenger/loader_shared_helpers.rb:278:in `block in run_load_path_setup_code'
  /usr/local/rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.6/lib/phusion_passenger/loader_shared_helpers.rb:381:in `running_bundler'
  /usr/local/rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.6/lib/phusion_passenger/loader_shared_helpers.rb:276:in `run_load_path_setup_code'
  /usr/local/rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.6/helper-scripts/rack-preloader.rb:99:in `preload_app'
  /usr/local/rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.6/helper-scripts/rack-preloader.rb:157:in `<module:App>'
  /usr/local/rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.6/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
  /usr/local/rvm/gems/ruby-2.0.0-p643/gems/passenger-5.0.6/helper-scripts/rack-preloader.rb:28:in `<main>'

[ 2015-04-08 15:28:57.0919 15177/7f5bbffff700 age/Hel/Req/CheckoutSession.cpp:252 ]: [Client 2-2] Cannot checkout session because a spawning error occurred. The identifier of the error is 91a2bd8f. Please see earlier logs for details about the error.

gem list [15:32:49]

* LOCAL GEMS *

actionmailer (4.2.1) actionpack (4.2.1) actionpack-action_caching (1.1.1) actionpack-xml_parser (1.0.1) actionview (4.2.1) activejob (4.2.1) activemodel (4.2.1) activerecord (4.2.1) activesupport (4.2.1) arel (6.0.0) builder (3.2.2) bundler (1.9.2) capybara (2.4.4) childprocess (0.5.5) climate_control (0.0.3) cocaine (0.5.7) coderay (1.1.0) docile (1.1.5) erubis (2.7.0) factory_girl (4.5.0) ffi (1.9.8) globalid (0.3.3) hike (1.2.3) htmlentities (4.3.3) i18n (0.7.0) jquery-rails (3.1.2) json (1.8.2) kaminari (0.16.3) loofah (2.0.1) mail (2.6.3) metaclass (0.0.4) mime-types (2.4.3) mini_portile (0.6.2) minitest (5.5.1) mocha (1.1.0) multi_json (1.11.0) mysql2 (0.3.18) net-ldap (0.3.1) nokogiri (1.6.6.2) pandoc-ruby (1.0.0) paperclip (4.2.1) protected_attributes (1.0.9) rack (1.6.0) rack-openid (1.4.2) rack-raw-upload (1.1.1) rack-test (0.6.3) rails (4.2.1) rails-deprecated_sanitizer (1.0.3) rails-dom-testing (1.0.6) rails-html-sanitizer (1.0.2) railties (4.2.1) rake (10.4.2) rbpdf (1.18.5) rdoc (4.2.0) redcarpet (3.1.2) request_store (1.0.5) rmagick (2.14.0) ruby-openid (2.3.0) rubyzip (1.1.7) rufus-scheduler (3.0.9) sass (3.4.13) sass-rails (5.0.3) selenium-webdriver (2.45.0) simplecov (0.9.2) simplecov-html (0.9.0) sprockets (2.12.3) sprockets-rails (2.2.4) thor (0.19.1) thread_safe (0.3.5) tilt (1.4.1) tzinfo (1.2.2) websocket (1.2.1) xpath (2.0.0) yard (0.8.7.6)

In bundle a can see :

rufus-scheduler 3.0.9

Jogi1j commented 9 years ago

Hi and sorry for the late reply (School must be the first :/ ).

Thank you for your advice, the program is primarily for Redmine 2.6, but... if I had the time over the weekend, I will try to test Redmine Version 3 and try your advice.

PS) again sorry for the wait

drifteaur commented 9 years ago

The scheduler needs the rufus-scheduler gem, running "bundle install" from the redmine directory should resolve the problem.