Why am I Getting This Passenger Error Could Not Find Rake-0.9.2.2 in Any of the Sources

Why am I getting this Passenger error Could not find rake-0.9.2.2 in any of the sources?

I fixed the same error doing packing the gems into vendor/bundle like this:

From inside your app directory:

$ bundle install --path vendor/bundle  

Give a shot and tell me if that works to you.

Passenger: Could not find rake-10.0.4 in any of the sources (Bundler::GemNotFound)

I think I've been struggling with this problem - I just posted my solution at:

  • https://stackoverflow.com/a/17088480/1578861

It sounds like your passenger configuration is pointing to a different version of ruby to the one you are using to run your bundler

Check which ruby version your rvm is using:

    $ rvm env --path

Find your passenger.conf and update PassengerRuby - you can do this using a config utility provided by passenger

   passenger-config --ruby-command

Make sure use use the fully qualified path before passenger-config (to avoid my frustrating late night mistake)

Error Could not find rake-10.5.0 in any of the sources on Phusion Passenger Docker image

This error is due to out of date software. Because the passenger images are not updated frequently it is important to bring everything up to date in your Dockerfile. This is how I generally setup a Dockerfile based off a phusion image:

FROM phusion/passenger-ruby22:0.9.18

ENV SYSTEM_UPDATE=1
RUN apt-get update \
&& apt-get upgrade -y -o Dpkg::Options::="--force-confold" \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /home/app
COPY Gemfile /home/app/Gemfile
COPY Gemfile.lock /home/app/Gemfile.lock
RUN gem update --system && \
gem update bundler && \
bundle install --jobs 4 --retry 5

# The rest of your app setup here

ENTRYPOINT ["/sbin/my_init", "--"]

SYSTEM_UPDATE is just a cache buster variable. When I bump that up all the packages will be updated on the next docker build. It should be bumped frequently.

I also ensure gem and bundler are fully up to date before running bundle install.

Also, there is no benefit to copying your Gemfile and Gemfile.lock to the tmp directory, just copy it to your application directory.

You can remove your final Clean up APT when done. command - that's really not the right place for that. There should be a single RUN line that runs all the apt-get commands in a single layer.

Take a look at https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/ for the best practices around setting up a Dockerfile, especially the sections about using apt-get.

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

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

Bundler::GemNotFound: Could not find rake-10.3.2 in any of the sources

bundle config set --local path 'vendor/cache'

generally fixes it as that is the more common problem. Basically, your bundler path configuration is messed up. See their documentation (first paragraph) for where to find those configurations and change them manually if needed.

Could not find rake-10.0.4 in any of the sources - passenger.conf issue?

OK, so with a fresh head after a good night's sleep and a bit more digging and I think I've got to the bottom of it.

I came across a post with a similar question to mine that put me on the trail of rvm wrappers. After a bit more searching I found the documentation that I should have referenced right from the start:

  • http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerRuby

So in my case, the solution is to update the PassengerRuby definition in <bitnami_install_dir>\apache2\conf\bitnami\passenger.comf to point to:

    PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p194/ruby

Now everything runs smoothly with the new gem versions (or git checkouts).



Related Topics



Leave a reply



Submit