在任何来源中都找不到 rake-12.3.0 (Bundler::GemNotFound) - Ubuntu 16.04



我在Ubuntu 16.04.2 LTS上使用Bitnami Redmine Stack 3.3.1-0

我最近安装了一个插件(问题模板- http://www.redmine.org/plugins/redmine_issue_templates)。

在此过程中,我使用bundle installbundle update更新了宝石。

执行此更新后,Redmine 网站不再工作。我收到错误:

"很抱歉,出了点问题。我们已收到有关此问题的通知,我们将尽快查看。

在分析apache错误日志时,我发现了错误:

"在任何来源中都找不到 rake-12.3.0(捆绑器::GemNotFound)">

但是,我已经检查了/opt/bitnami/apps/redmine/htdocs/vendor//opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems,两个位置都包含rake-12.3.0。我不确定为什么会出现此问题。

我卸载了插件并删除了文件,但我仍然遇到问题。我在/opt/bitnami/apps/redmine/htdocs/文件夹中尝试了bundle installbundle updategem install rake -v '12.3.0'bundle exec rake rails:update:bin,我也尝试了/opt/bitnami/ruby/bin文件夹中的./gem update,但我仍然有问题。

请告诉我该怎么做。

[ 2018-03-15 15:35:23.8349 28957/7f4ce96ec700 age/Hel/Req/CheckoutSession.cpp:252 ]: [Client 4-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 35671c4a. Please see earlier logs for details about the error.
App 4445 stdout: 
App 4445 stderr: /opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/lib/phusion_passenger/config/system_metrics_command.rb:34: warning: Insecure world writable dir /opt/bitnami/ruby/bin in PATH, mode 040757
App 4445 stdout: 
[ 2018-03-15 15:35:29.9175 28957/7f4ce86a9700 App/Implementation.cpp:287 ]: Could not spawn process for application /opt/bitnami/apps/redmine/htdocs/: An error occured while starting up the preloader.
Error ID: 16a39427
Error details saved to: /tmp/passenger-error.3ZEVOb
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>daemon</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>
</ol>
<p>-------- The exception is as follows: -------</p>
Could not find rake-12.3.0 in any of the sources (Bundler::GemNotFound)
<pre>  /opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler/spec_set.rb:88:in `block in materialize&#39;
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler/spec_set.rb:82:in `map!&#39;
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler/spec_set.rb:82:in `materialize&#39;
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler/definition.rb:170:in `specs&#39;
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler/definition.rb:237:in `specs_for&#39;
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler/definition.rb:226:in `requested_specs&#39;
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:108:in `block in definition_method&#39;
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:20:in `setup&#39;
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler.rb:107:in `setup&#39;
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/lib/bundler/setup.rb:20:in `&lt;top (required)&gt;&#39;
/opt/bitnami/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require&#39;
/opt/bitnami/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require&#39;
/opt/bitnami/ruby/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require&#39;
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/lib/phusion_passenger/loader_shared_helpers.rb:278:in `block in run_load_path_setup_code&#39;
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/lib/phusion_passenger/loader_shared_helpers.rb:381:in `running_bundler&#39;
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/lib/phusion_passenger/loader_shared_helpers.rb:276:in `run_load_path_setup_code&#39;
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/helper-scripts/rack-preloader.rb:99:in `preload_app&#39;
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/helper-scripts/rack-preloader.rb:157:in `&lt;module:App&gt;&#39;
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/helper-scripts/rack-preloader.rb:29:in `&lt;module:PhusionPassenger&gt;&#39;
/opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems/passenger-5.0.6/helper-scripts/rack-preloader.rb:28:in `&lt;main&gt;&#39;</pre>

[ 2018-03-15 15:35:29.9342 28957/7f4ceaeef700 age/Hel/Req/CheckoutSession.cpp:252 ]: [Client 1-2] Cannot checkout session because a spawning error occurred. The identifier of the error is 16a39427. Please see earlier logs for details about the error.

您是否在运行"捆绑">命令之前加载了 Bitnami 环境?在/opt/bitnami/有一个名为"use_redmine">的脚本。请在运行命令之前运行它。

例如:

/opt/bitnami/use_redmine
cd /opt/bitnami/apps/redmine/htdocs/
bundle ...

注意:如果您在 Ubuntu 上以超级用户"root"身份安装了 Redmine Stack,则需要使用sudo /opt/bitnami/use_redmine加载环境

最新更新