Questions tagged ruby

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

How do I install foreman on a Ruby/Ubuntu Docker image? [duplicate]

I’m trying to build a Rails 4.2/Ruby 2.4.5/Ubuntu 18 image with Docker and I would like to install foreman for my Rails app. I have this Dockerfile # sshd # # VERSION 0.0.1 FROM drecom/ubuntu-base:latest MAINTAINER Drecom Technical Development Department <[email protected]> RUN git clone git:// /usr/local/rbenv && git clone git:// /usr/local/rbenv/plugins/ruby-build && git clone git:// […]

By Dave
Categorised as docker, foreman, ruby, ruby-on-rails, ubuntu Tagged , , , ,

Error running prometheus_exporter gem in docker container

I’m trying to start the prometheus_exporter gem with -b parameter, in a docker container. I get this error: remote: /usr/local/lib/ruby/2.6.0/socket.rb:227:in `getaddrinfo’: getaddrinfo: Name or service not known (SocketError) remote: from /usr/local/lib/ruby/2.6.0/socket.rb:227:in `foreach’ remote: from /usr/local/lib/ruby/2.6.0/socket.rb:762:in `tcp_server_sockets’ remote: from /usr/local/lib/ruby/2.6.0/webrick/utils.rb:65:in `create_listeners’ remote: from /usr/local/lib/ruby/2.6.0/webrick/server.rb:127:in `listen’ remote: from /usr/local/lib/ruby/2.6.0/webrick/server.rb:108:in `initialize’ remote: from /usr/local/lib/ruby/2.6.0/webrick/httpserver.rb:47:in `initialize’ remote: from […]

By wsa
Categorised as docker, dockerfile, prometheus, ruby Tagged , , ,

How to fix `Function not implemented – Failed to initialize inotify (Errno::ENOSYS)` when using docker to build rails app

I’m using Docker to build a rails app. When I run rails console, rails server… they all give error related to rb-inotify library. /usr/local/bundle/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:58:in `initialize’: Function not implemented – Failed to initialize inotify (Errno::ENOSYS) Docker version: 20.10.11 Ruby version: 2.2.3 Rails version: Mac mini (M1, 2020) I have also tried some of the fixes […]

By Tr n H u Trung
Categorised as docker, inotify, macos, ruby, ruby-on-rails Tagged , , , ,

Docker-compose and rails console issue. ‘Could not find rake-13.0.6 in any of the sources’

I’m having some issues when trying to run rails console under docker. All other rails commands work as expected, but console does not. ➜ octopus git:(master) ✗ docker-compose run web bundle exec rails c Creating octopus_web_run … done Could not find rake-13.0.6 in any of the sources Run `bundle install` to install missing gems. ERROR: […]

By ngelx
Categorised as bundler, docker, docker-compose, ruby, ruby-on-rails Tagged , , , ,

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 , , , ,

ERROR: trying to use Nokogiri as a precompiled native gem on a system with glibc < 2.17

I’m using Docker to run a Rails application with a Macbook M1 and have found that I’m getting errors like these quite often, when my colleagues who use Intel Macbooks or Linux machines don’t seem to have any issues. The subject error occured after a bunch of gem updates:- ERROR: It looks like you’re trying […]

By s89
Categorised as apple-m1, docker, ruby, ruby-on-rails Tagged , , ,

app changes not reflecting while runnning docker image

I am running a docker image and whenever I make any new changes inside the app folder such as in controllers or views the changes are not relfected in browser. Everytime I need to create a new image inorder to reflect the changes. Dockerfile FROM ruby:3.0 USER root RUN apt-get update && apt-get install -y […]

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 , , ,

Docker – exit code 132 [closed]

For a rails framework( with oracle_instant_client_21_4 docker image docker-compose up fails after starting with following error : "exited with code 132" Source: Docker Questions

By Sapna Sanjeeva
Categorised as compose, docker, ruby, ruby-on-rails 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 , , ,
1 14

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