LINUX.ORG.RU

Обновить RedMine c 3.2.0 до 4.0.0

 


0

1

Добрый день. Подскажите что делаю не так, ни как не могу обновить редмайн.

Есть сервер c Ubuntu 14 и RedMIne 3.2.0 Я его клонировал что бы попробовать обновить. Для начала обновил убунту до 16 версии. После обновления старый редмайн запускается норм. Далее по ниструкции

http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade

Сам редмайн с правами redmine:redmine

Далее по инструкции. Качаю архив с 4.0.0 извлекаю в папку /opt/ где хранится 3.2.0 Даю права папке /opt/redmine-4.0.0 для пользователя redmine.

Далее по инструкции копирую нужны файлы и директории из старого редмайна в новый с сохранением прав.

Далее запускаю

bundle exec rake generate_secret_token

Выдает ошибку. Делаю purge ruby, install ruby-full

Далее rm /usr/local/bin/bundle и gem install bundler После чего комманда срабатывает.

svn update пропускаю.

Делаю комманды

sudo bundle exec rake db:migrate RAILS_ENV=production 
sudo bundle exec rake redmine:plugins:migrate RAILS_ENV=production
sudo bundle exec rake tmp:cache:clear RAILS_ENV=production

В итоге сайт не работает, выдаёт:

We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly.

лог файл

App 30358 stdout:
App 30358 stdout:
[ 2018-12-29 05:21:13.9429 15671/7fea89ef9700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /opt/redmine-4.0.0: An error occurred while starting up the preloader.
  Error ID: 6600e00b
  Error details saved to: /tmp/passenger-error-k6B1RE.html
  Message from application: <p>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:</p>

  <pre class="commands">bundle install</pre>

<p>If that didn't work, then the problem is probably caused by your application being run under a different environment than it's supposed to. Please check the following:</p>

<ol>
  <li>Is this app supposed to be run as the <code>redmine</code> user?</li>
  <li>Is this app being run on the correct Ruby interpreter? Below you will
      see which Ruby interpreter Phusion Passenger attempted to use.</li>
  <li>Please check whether the correct RVM gemset is being used.</li>
  <li>Sometimes, RVM gemsets may be broken.
      <a href="https://github.com/phusion/passenger/wiki/Resetting-RVM-gemsets">Try resetting them.</a></li>
</ol>

<p>-------- The exception is as follows: -------</p>
Could not find activesupport-5.2.2 in any of the sources (Bundler::GemNotFound)
<pre>  /home/redmine/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/spec_set.rb:94:in `block in materialize&#39;
  /home/redmine/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/spec_set.rb:87:in `map!&#39;
  /home/redmine/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/spec_set.rb:87:in `materialize&#39;
  /home/redmine/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/definition.rb:137:in `specs&#39;
  /home/redmine/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/definition.rb:182:in `specs_for&#39;
  /home/redmine/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/definition.rb:171:in `requested_specs&#39;
  /home/redmine/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/environment.rb:18:in `requested_specs&#39;
  /home/redmine/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:13:in `setup&#39;
  /home/redmine/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler.rb:92:in `setup&#39;
  /home/redmine/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/setup.rb:18:in `&lt;top (required)&gt;&#39;
  /home/redmine/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require&#39;
  /home/redmine/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require&#39;
  /home/redmine/.rvm/gems/ruby-2.2.1/gems/passenger-5.0.24/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:430:in `activate_gem&#39;
  /home/redmine/.rvm/gems/ruby-2.2.1/gems/passenger-5.0.24/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:297:in `block in run_load_path_setup_code&#39;
  /home/redmine/.rvm/gems/ruby-2.2.1/gems/passenger-5.0.24/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:435:in `running_bundler&#39;
  /home/redmine/.rvm/gems/ruby-2.2.1/gems/passenger-5.0.24/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:296:in `run_load_path_setup_code&#39;
  /home/redmine/.rvm/gems/ruby-2.2.1/gems/passenger-5.0.24/src/helper-scripts/rack-preloader.rb:100:in `preload_app&#39;
  /home/redmine/.rvm/gems/ruby-2.2.1/gems/passenger-5.0.24/src/helper-scripts/rack-preloader.rb:156:in `&lt;module:App&gt;&#39;
  /home/redmine/.rvm/gems/ruby-2.2.1/gems/passenger-5.0.24/src/helper-scripts/rack-preloader.rb:30:in `&lt;module:PhusionPassenger&gt;&#39;
  /home/redmine/.rvm/gems/ruby-2.2.1/gems/passenger-5.0.24/src/helper-scripts/rack-preloader.rb:29:in `&lt;main&gt;&#39;</pre>


[ 2018-12-29 05:21:13.9488 15671/7fea8b7fe700 age/Cor/Con/CheckoutSession.cpp:277 ]: [Client 2-6] Cannot checkout session because a spawning error occurred. The identifier of the error is 6600e00b. Please see earlier logs for details about the error.

И ничего не могу поделать с этим...

Ответ на: комментарий от Linuxman

выяснил что под пользователем redmine версия ruby 2.1.1 а нужна версия 2.2.2, под root ruby 2.3.1.

Все махинации как я понял нужно выполнять под пользователем redmine. Но я не пойму как мне изменить версию ruby

Для root ruby является /usr/bin/ruby Для redmine ruby является /home/redmine/.rvm/rubies/ruby-2.2.1/bin/ruby

madcry ()
Ответ на: комментарий от madcry

С Ruby разобрался. Все сделал по инструкции кроме svn - это критично или нет? Все прошло успешно, но все так же в логах пишет

Could not find activesupport-5.2.2 in any of the sources (Bundler::GemNotFound)

gem list

*** LOCAL GEMS ***

actioncable (5.2.2)
actionmailer (5.2.2)
actionpack (5.2.2)
actionpack-xml_parser (2.0.1)
actionview (5.2.2)
activejob (5.2.2)
activemodel (5.2.2)
activerecord (5.2.2)
activestorage (5.2.2)
activesupport (5.2.2)
addressable (2.5.2)
arel (9.0.0)
bigdecimal (default: 1.3.4)
builder (3.2.3)
bundler (default: 1.16.2)
bundler-unload (1.0.2)
cmath (default: 1.0.0)
concurrent-ruby (1.1.4)
crass (1.0.4)
css_parser (1.6.0)
csv (3.0.2, default: 1.0.0)
date (default: 1.0.0)
dbm (default: 1.0.0)
did_you_mean (1.2.0)
erubi (1.8.0)
etc (default: 1.0.0)
executable-hooks (1.5.0)
fcntl (default: 1.0.0)
fiddle (default: 1.0.0)
fileutils (default: 1.0.2)
gdbm (default: 2.0.0)
gem-wrappers (1.4.0)
globalid (0.4.1)
htmlentities (4.3.4)
i18n (0.7.0)
io-console (default: 0.4.6)
ipaddr (default: 1.2.0)
json (default: 2.1.0)
loofah (2.2.3)
mail (2.7.1)
marcel (0.3.3)
method_source (0.9.2)
mimemagic (0.3.3)
mini_mime (1.0.1)
mini_portile2 (2.3.0)
minitest (5.11.3, 5.10.3)
mysql2 (0.5.2)
net-ldap (0.16.1)
net-telnet (0.1.1)
nio4r (2.3.1)
nokogiri (1.8.5)
openssl (default: 2.1.2)
power_assert (1.1.1)
psych (default: 3.0.2)
public_suffix (3.0.3)
rack (2.0.6)
rack-openid (1.4.2)
rack-test (1.1.0)
rails (5.2.2)
rails-dom-testing (2.0.3)
rails-html-sanitizer (1.0.4)
railties (5.2.2)
rake (12.3.2, 12.3.0)
rbpdf (1.19.6)
rbpdf-font (1.19.1)
rdoc (default: 6.0.1)
redcarpet (3.4.0)
request_store (1.0.5)
rmagick (2.16.0)
roadie (3.4.0)
roadie-rails (1.3.0)
rouge (3.3.0)
ruby-openid (2.3.0)
rubygems-bundler (1.4.5)
rvm (1.11.3.9)
scanf (default: 1.0.0)
sdbm (default: 1.0.0)
sprockets (3.7.2)
sprockets-rails (3.2.1)
stringio (default: 0.0.1)
strscan (default: 1.0.0)
test-unit (3.2.7)
thor (0.20.3)
thread_safe (0.3.6)
tzinfo (1.2.5)
webrick (default: 1.4.2)
websocket-driver (0.7.0)
websocket-extensions (0.1.3)
xmlrpc (0.3.0)
zlib (default: 1.0.0)

madcry ()