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

Use top level namespace for Rails::Railtie class #5

Merged

Conversation

seemiller
Copy link
Contributor

@seemiller seemiller commented Aug 15, 2024

Updated a Rails app to 7.2. When I tried to run rspec, I got the following error.

An error occurred while loading rails_helper.
Failure/Error: require_relative '../config/environment'

NameError:
  uninitialized constant Dotenv::Rails::Railtie
# ./vendor/bundle/ruby/3.3.0/gems/dotenv-beefy-0.2.0/lib/dotenv/beefy/railtie.rb:6:in `<module:Beefy>'
# ./vendor/bundle/ruby/3.3.0/gems/dotenv-beefy-0.2.0/lib/dotenv/beefy/railtie.rb:5:in `<module:Dotenv>'
# ./vendor/bundle/ruby/3.3.0/gems/dotenv-beefy-0.2.0/lib/dotenv/beefy/railtie.rb:4:in `<main>'
# ./vendor/bundle/ruby/3.3.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
# ./vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.17/lib/zeitwerk/kernel.rb:34:in `require'
# ./vendor/bundle/ruby/3.3.0/gems/dotenv-beefy-0.2.0/lib/dotenv/beefy.rb:2:in `<main>'
# ./vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.17/lib/zeitwerk/kernel.rb:34:in `require'
# /usr/local/bundle/gems/bundler-2.5.17/lib/bundler.rb:212:in `require'
# ./config/application.rb:21:in `<top (required)>'
# ./config/environment.rb:4:in `require_relative'
# ./config/environment.rb:4:in `<top (required)>'
# ./spec/rails_helper.rb:6:in `require_relative'
# ./spec/rails_helper.rb:6:in `<top (required)>'
# ------------------
# --- Caused by: ---
# LoadError:
#   cannot load such file -- dotenv-beefy
#   ./vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.17/lib/zeitwerk/kernel.rb:34:in `require'

Updated the run_tests workflow to use recent versions of Ruby and setup-ruby.
And also looks like my editor cleaned up some whitespace.

@seemiller
Copy link
Contributor Author

@larsklevan @cfurrow Hey guys! As maintainers of dotenv-beefy, could you take a look at this PR! Thanks!

Copy link
Contributor

@cfurrow cfurrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

image

@larsklevan
Copy link
Contributor

@wireframe looking at https://rubygems.org/gems/dotenv-beefy it looks like you own the published version of this gem. Are you up for publishing a new version with this fix?

@wireframe
Copy link
Contributor

wireframe commented Aug 19, 2024

Are you up for publishing a new version with this fix?

Of course! I'll get that done this morning, and check to see if it's possible to transition rubygem ownership to an organizer account (any tips appreciated).

@wireframe wireframe merged commit 2741148 into betterup:master Aug 19, 2024
1 check passed
@wireframe
Copy link
Contributor

This PR has been merged and included in the 0.2.1 release which is now published to rubygems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants