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
Error Install Rubyracer with Error "Invalid Gem: Package Is Corrupt"
Splitting String into Pair of Characters in Ruby
How to Click on a Specific Coordinates of an Element
How to Change the Default Value of a Struct Attribute
How to Transpose Different Sized Ruby Arrays
How to Get the Current Test Filename from Rspec
Version Sort (With Alphas, Betas, etc.) in Ruby
Rails Error Method_Missing': Undefined Method 'This' for Gem::Specification
What Are the Ruby Win32API Parameters | How to Pass a Null Pointer
In Ruby, Why Is a Method Invocation Not Able to Be Treated as a Unit When "Do" and "End" Is Used
Ruby on Rails 4 - Simple_Form Multiple Select Input
Cannot Install Any Version of Ruby on Mojave - Internal Ranlib Command Failed
How to Include Blank Field in Select_Tag
Error in Celluloid Gem Installation
How to Batch Convert Mp4 Files to Ogg with Ffmpeg Using a Bash Command or Ruby
How to Preload Concerns in a Rails Initializer Using Rails 6/Zeitwerk