Questions tagged rubygems

Explore the latest questions and answers asked by our top developers.

How can I copy installed gems from between Docker stages?

I have a Dockerfile which I’m trying to make multi-staged. It looks something like this: FROM <image> AS build-step RUN bundle install FROM <image> COPY –from=build-step $BUNDLE_INSTALL_PATH ./ Now I’m not sure what to use for the BUNDLE_INSTALL_PATH. What’s the cleanest way to copy over bundle installs from one stage to another? Source: Docker Questions

By Zahin Zaman
Categorised as bundler, docker, dockerfile, ruby, rubygems Tagged , , , ,

Rails with Docker ‘Could not find … in any of the sources’ for an existing gem

My rails application runs using a docker and everytime I try to execute any ‘bin/rails’ commands in the terminal of the docker container, it raises the following error Could not find racc-1.6.0 in any of the sources Run `bundle install` to install missing gems. on executing ‘gem list’ I have checked that racc is installed […]

By JinseiNagai
Categorised as docker, ruby, ruby-on-rails, rubygems Tagged , , ,

Using a Docker image to run bundle install ignores bundle config setting

I’m hoping to use a Docker image (ruby:3.0) build an image without (eventually) having to have Ruby installed locally. For testing purposes, I have Ruby 2.7.0 installed in Windows 10 WSL2 environment: $ ruby -v ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu] I have a Gemfile: source ‘’ gem ‘sinatra’ group :development, :test do gem ‘thin’ […]

By Craig
Categorised as bundler, docker, ruby, rubygems Tagged , , ,

How can I easily review a server installed dependencies for unpatched plugins?

I am working on a server migration and upgrade, and I don’t code in Ruby at all. Is there an easy way for me to scan / review the gemfile / installed dependencies to check that latest updated / unpatched dependencies? The code references to a hundred at least dependencies and I am not sure […]

By Jay Best
Categorised as docker, ruby, ruby-on-rails-3, rubygems Tagged , , ,

Rails Dockerfile no longer building, unable to install racc

I have been working with the same Dockerfile for months on a rails api and suddenly it will no longer build. I am getting an error everytime it tries to install racc : #11 7.201 Installing racc 1.6.0 with native extensions #11 7.598 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. #11 7.598 #11 7.598 […]

By Galen-h
Categorised as alpine, docker, nokogiri, ruby-on-rails, rubygems Tagged , , , ,

Dockfile image build failing due to bundler issues and GemNotFoundException

The docker image "web" seems to fail as the image is built with the following error code: web_1 | Traceback (most recent call last): web_1 | 2: from /usr/local/bin/bundle:23:in `<main>’ web_1 | 1: from /usr/local/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path’ web_1 | /usr/local/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe’: Could not find ‘bundler’ (2.2.24) required by your /prospector/Gemfile.lock. (Gem::GemNotFoundException) web_1 | To update to […]

By stuckNconfuzed
Categorised as bundler, docker, ruby, rubygems Tagged , , ,

Dockerizing Existing Rails Application

I’ve been trying to move my rails app into a docker container, as it used to be ansible managed in a virtualbox for dev env. I’ve looked at a few docker tutorials and a couple specific to migrating rails applications but I am running into the following error: => ERROR [10/10] RUN rails c 0.9s […]

By Matt Matero
Categorised as bundler, docker, ruby, ruby-on-rails, rubygems Tagged , , , ,

Bundler could not find rake in any of the resources

Im running ruby version 2.6.1 with docker. Rake gem is version 13.0.1. Whenever I tried docker-compose up, it always fails and throws this error everytime: This error did not exist before. redis_1 | WARNING: no logs are available with the ‘none’ log driver db_1 | WARNING: no logs are available with the ‘none’ log driver […]

Could not resolve host: api’ after bundle install Gemfile with git repo in it

Hope anyone can help me. We are currently resolving an issue related to the "mimemagic" recently by including a git source to the mimemagic gem as the source of it. However, after running bundle install and initialized our app, "This page isn’t working and the logs state that it "Could not resolve host: api’ in […]

By rjcarl
Categorised as docker, git, ruby, ruby-on-rails, rubygems Tagged , , , ,

Can not install gem therubyracer in docker

I am using Mac and I want to run Ruby On Rails project on docker. My setup is: Dockerfile: FROM ruby:2.7.2 RUN apt-get update -qq && apt-get install -y build-essential RUN apt-get install -y libv8-dev RUN apt-get install -y libpq-dev RUN apt-get install -y libxslt-dev liblzma-dev patch git-core zlib1g-dev libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev […]

By B nh Tr ng
Categorised as docker, ruby, ruby-on-rails, rubygems Tagged , , ,
1 2

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us