【问题标题】:Could not find rake-12.3.0 in any of the sources (Bundler::GemNotFound) - Bitnami Redmine Stack 3.3.1-0 on Ubuntu 16.04.2 LTS在任何源中都找不到 rake-12.3.0 (Bundler::GemNotFound) - Ubuntu 16.04.2 LTS 上的 Bitnami Redmine Stack 3.3.1-0
【发布时间】:2018-08-24 20:46:37
【问题描述】:

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

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

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

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

“很抱歉,出了点问题。我们已收到有关此问题的通知,我们会尽快进行查看。”

分析apache错误日志,发现错误:

“在任何源中都找不到 rake-12.3.0 (Bundler::GemNotFound)”

但是,我检查了 /opt/bitnami/apps/redmine/htdocs/vendor//opt/bitnami/ruby/lib/ruby/gems/2.1.0/gemsrake-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.

【问题讨论】:

    标签: rake passenger bundler redmine bitnami


    【解决方案1】:

    您是否在运行 "bundle" 命令之前加载了 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 加载环境

    【讨论】:

    • 您好,我在安装插件时没有加载bitnami环境。我认为这就是问题所在。我删除了vendor 文件夹和gemfile.lock 文件,并使用Bitnami EnvironmentHow to Install a Plugin on Redmine 中的说明重新运行bundle install。现在一切正常。谢谢。
    • 太棒了!很高兴您能够解决此问题。
    猜你喜欢
    • 2018-04-08
    • 2012-04-19
    • 2015-03-04
    • 2014-07-11
    • 2019-11-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-08
    相关资源
    最近更新 更多