Search code examples
rakepassengerbundlerredminebitnami

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


I am using the Bitnami Redmine Stack 3.3.1-0 on Ubuntu 16.04.2 LTS.

I recently installed a plugin (Issue Templates - http://www.redmine.org/plugins/redmine_issue_templates).

In the process, I updated the gems using bundle install and bundle update.

After performing this update, the Redmine website no longer works. I get the error:

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

Upon analyzing the apache error log, I find the error:

"Could not find rake-12.3.0 in any of the sources (Bundler::GemNotFound)"

However, I have checked /opt/bitnami/apps/redmine/htdocs/vendor/ and /opt/bitnami/ruby/lib/ruby/gems/2.1.0/gems and rake-12.3.0 is included in both locations. I am not sure why this issue is occuring.

I uninstalled the plugin and removed the files, but I still have the issue. I tried bundle install, bundle update, gem install rake -v '12.3.0', bundle exec rake rails:update:bin in the /opt/bitnami/apps/redmine/htdocs/ folder, and I also tried ./gem update in the /opt/bitnami/ruby/bin folder, but I still have the issue.

Please advise me what to do.

[ 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.

Solution

  • Did you load the Bitnami environment before running the "bundle" commands? There's a script at /opt/bitnami/ called "use_redmine". Please run it before running the commands.

    For instance:

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

    Note: if you installed the Redmine Stack as superuser "root" on your Ubuntu, you need to load the environment using sudo /opt/bitnami/use_redmine