Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GemNotFound - active_record_query_trace-1.8 #15346

Closed
Quving opened this issue Dec 14, 2020 · 10 comments
Closed

GemNotFound - active_record_query_trace-1.8 #15346

Quving opened this issue Dec 14, 2020 · 10 comments
Labels
bug Something isn't working

Comments

@Quving
Copy link

Quving commented Dec 14, 2020

I cannot run docker-compose up -d due to a missing Gem (active_record_query_trace-1.8) in the Gemfile of the project.

Expected behaviour

Docker Image is built correctly

Actual behaviour

/opt/ruby/lib/ruby/gems/2.7.0/gems/bundler-2.2.0/lib/bundler/spec_set.rb:86:in `block in materialize': Could not find active_record_query_trace-1.8 in any of the sources (Bundler::GemNotFound)
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/bundler-2.2.0/lib/bundler/spec_set.rb:80:in `map!'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/bundler-2.2.0/lib/bundler/spec_set.rb:80:in `materialize'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/bundler-2.2.0/lib/bundler/definition.rb:175:in `specs'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/bundler-2.2.0/lib/bundler/definition.rb:245:in `specs_for'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/bundler-2.2.0/lib/bundler/definition.rb:227:in `requested_specs'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/bundler-2.2.0/lib/bundler/runtime.rb:91:in `block in definition_method'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/bundler-2.2.0/lib/bundler/runtime.rb:20:in `setup'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/bundler-2.2.0/lib/bundler.rb:149:in `setup'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/bundler-2.2.0/lib/bundler/setup.rb:20:in `block in <top (required)>'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/bundler-2.2.0/lib/bundler/ui/shell.rb:136:in `with_level'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/bundler-2.2.0/lib/bundler/ui/shell.rb:88:in `silence'
	from /opt/ruby/lib/ruby/gems/2.7.0/gems/bundler-2.2.0/lib/bundler/setup.rb:20:in `<top (required)>'
	from /opt/ruby/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
	from /opt/ruby/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
	from /opt/mastodon/config/boot.rb:3:in `<top (required)>'
	from /opt/mastodon/bin/rails:3:in `require_relative'
	from /opt/mastodon/bin/rails:3:in `<main>'

Steps to reproduce the problem

  1. Clone the project
  2. cp .env.production.sample to .env.production
  3. docker-compose up -d
@Quving Quving added the bug Something isn't working label Dec 14, 2020
@manfredsteger
Copy link

same problem today with docker on Ubuntu 2020.

@Gargron
Copy link
Member

Gargron commented Dec 14, 2020

You can get the already built image from Docker Hub. Why the gem is missing needs to be investigated separately though

@ClearlyClaire
Copy link
Contributor

Try setting RAILS_ENV=production first?

@Gargron
Copy link
Member

Gargron commented Dec 15, 2020

But it's in Docker

@orlea
Copy link
Contributor

orlea commented Dec 16, 2020

The same problem occurs in Mastodon v3.2.1.
When I run docker build, it reports that active_record_query_trace-1.7 is not found.

Step 35/43 : USER mastodon
 ---> Running in 2317a40ec2c1
Removing intermediate container 2317a40ec2c1
 ---> 54708a966a3d
Step 36/43 : RUN cd ~ && 	OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && 	yarn cache clean
 ---> Running in 7a749405bde1
/opt/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.2.1/lib/bundler/spec_set.rb:86:in `block in materialize': Could not find active_record_query_trace-1.7 in any of the sources (Bundler::GemNotFound)
	from /opt/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.2.1/lib/bundler/spec_set.rb:80:in `map!'
	from /opt/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.2.1/lib/bundler/spec_set.rb:80:in `materialize'
	from /opt/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.2.1/lib/bundler/definition.rb:175:in `specs'
	from /opt/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.2.1/lib/bundler/definition.rb:245:in `specs_for'
	from /opt/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.2.1/lib/bundler/definition.rb:227:in `requested_specs'
	from /opt/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.2.1/lib/bundler/runtime.rb:91:in `block in definition_method'
	from /opt/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.2.1/lib/bundler/runtime.rb:20:in `setup'
	from /opt/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.2.1/lib/bundler.rb:149:in `setup'
	from /opt/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.2.1/lib/bundler/setup.rb:20:in `block in <top (required)>'
	from /opt/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.2.1/lib/bundler/ui/shell.rb:136:in `with_level'
	from /opt/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.2.1/lib/bundler/ui/shell.rb:88:in `silence'
	from /opt/ruby/lib/ruby/gems/2.6.0/gems/bundler-2.2.1/lib/bundler/setup.rb:20:in `<top (required)>'
	from /opt/ruby/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	from /opt/ruby/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
	from /opt/mastodon/config/boot.rb:3:in `<top (required)>'
	from /opt/mastodon/bin/rails:3:in `require_relative'
	from /opt/mastodon/bin/rails:3:in `<main>'
The command '/bin/sh -c cd ~ && 	OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && 	yarn cache clean' returned a non-zero code: 1
time="2020-12-15T12:27:08Z" level=fatal msg="exit status 1"

@OccultWarlock
Copy link

Same error here as well. The error also occurs when I try to compile the mastodon source code from Docker Hub website.

@orlea
Copy link
Contributor

orlea commented Dec 17, 2020

This is probably a problem with bundler 2.2.1.
I changed gem install bundler to gem install bundler -v 2.1.4 in the Dockerfile, and the docker build succeeded.

@Quving
Copy link
Author

Quving commented Dec 17, 2020

@orlea Ah, thanks for the hint! :)

@orlea
Copy link
Contributor

orlea commented Dec 18, 2020

@Gargron @ThibG
With the release of bundler 2.2.2, I can now build without having to modify the Dockerfile.
https://github.com/rubygems/rubygems/releases/tag/bundler-v2.2.2
Isn't it possible to specify the version of bundler in Gemfile.lock or something?

@ClearlyClaire
Copy link
Contributor

Someone also reported that it worked by removing the RAILS_LOG_LEVEL=warn they had in their .env.production, although I don't understand how it could be this way.

@orlea locking the bundler version might possibly be an issue as we target compatibility with multiple Ruby versions

@vmstan vmstan closed this as completed Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants