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

Web Console is activated in the test environment when running parallel:spec #395

Closed
klyonrad opened this issue Jun 25, 2019 · 8 comments
Closed
Labels

Comments

@klyonrad
Copy link

Steps to reproduce

  1. bundle exec rake parallel:spec

Show how you included dotenv (Gemfile).

gem 'web-console', group: :development

group :development, :test do
  gem 'dotenv-rails'
end

Expected behavior

Tests run in test environment.

Actual behavior

Tests don't start running.

Web Console is activated in the test environment. This is
usually a mistake. To ensure it's only activated in development
mode, move it to the development group of your Gemfile:

    gem 'web-console', group: :development

If you still want to run it in the test environment (and know
what you are doing), put this in your Rails application
configuration:

    config.web_console.development_only = false

When I execute

RAILS_ENV=test bundle exec rake parallel:spec

The tests actually run fine

System configuration

dotenv version:
2.7.4
Rails version:
5.2
Ruby version:
2.6.2

@klyonrad
Copy link
Author

I suspect this comes from #384

@klyonrad
Copy link
Author

klyonrad commented Aug 5, 2019

#289 Looks very similar

@Dantemss
Copy link

I can confirm that dotenv-rails 2.7.3 and 2.7.4 break rake parallel:spec if web-console is also in the Gemfile (under the development group).

@florianroesler
Copy link

florianroesler commented Oct 8, 2019

What is the state of this issue? I have just updated the gems in one of my project that is using parallel:spec and now I am seeing the mentioned error.

web-console is in the development group and dotenv is at version 2.7.5. The parallel specs worked before when I was using dotenv version 2.7.2.

@stale
Copy link

stale bot commented Dec 7, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 7, 2019
@stale stale bot closed this as completed Dec 14, 2019
@StanBoyet
Copy link

Hello,
If I may, the issue is not resolved and is still preventing us from running our test suite with bundle exec rake parallel:spec since we updated

@anicholson
Copy link

It's kludgy, but prepending RAILS_ENV=test to the rake command resolved this issue for me. Given #384, sounds like a race condition 😬

@krtschmr
Copy link

krtschmr commented Oct 17, 2022

still going strong

chrislo added a commit to freerange/jam-coop that referenced this issue Aug 6, 2023
I don't think we'll normally need to send real emails in development,
but it is useful to have the option to test things out. This commit
uses dotenv to provide a configuration flag
`USE_POSTMARK_IN_DEVELOPMENT` (for development environments only) to
toggle the delivery method between postmark and letter_opener.

I've had to remove web-console from the Gemfile to work around this
issue: bkeepers/dotenv#395
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants