Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

739
Views
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 as 'racc (1.6.0 default: 1.5.1)' and calling 'bundle install' as the app suggest raises the same error. I assumed that maybe the 'default: 1.5.1' is the problem but did not manage to come around this one so far. Also executing 'which racc' or 'bundle info racc' returns the correct version of racc which is 1.6.0.

Update:

an exception is 'bin/rails server' which means the application launches like usual but I cannot do migrations and console calls. Trying to use other racc version did not do any better since using 1.5.2 raises the same error and 1.5.1 requires nokogiri-linux which I did not manage to install locally so far

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

please try “docker-compose run web bundle install” command. This should work

over 4 years ago · Santiago Trujillo Report

0

So, after trying a bunch of commands and re-deploying the image I figured out that in the end creating a new project would solve most of the issues. Unfortunately, I still did not find out the cause of this problem but I assume there might have been conflicts in the configuration or general problems in the project setting. So heres the solution summed up

Solution 1:

  • create a new rails project and make sure it has identical gem requirement as the original project (simple way of doing this is to copy/paste the content of gemfile from the original project)
  • run new project application and check if bin/rails console (optional)
  • copy the entire content of the new project into the original project (don't forget to back up original project before doing so)

Solution 2:

  • if your project directory has a hidden .bundle folder, delete it to prevent rails app from reading gems in vendor/cache. Check bundle info <gem-name> to see if gem path is set on the correct gem-directory

Probably not a solution for all cause but this was my last option to try when everything else failed

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!