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

irb: warn: can't alias context from irb_context. #78

Closed
jacobjlevine opened this issue Jun 21, 2020 · 3 comments
Closed

irb: warn: can't alias context from irb_context. #78

jacobjlevine opened this issue Jun 21, 2020 · 3 comments

Comments

@jacobjlevine
Copy link

When I run the rails console in my development environment, I get a warning saying irb: warn: can't alias context from irb_context. I've isolated it to this gem (currently running 1.3.0). I'm guessing this is related to this previously resolved issue from rspec-rails:

rspec/rspec-rails#1645

@JonRowe
Copy link
Member

JonRowe commented Jun 21, 2020

I'd suggest this is because you are requiring rspec/its in your development environment and not limiting it to test like rspec/core. Unlike rspec-rails this gem does not need to be loaded in the development environment, so changing your bundle grouping should remove the warning.

@jacobjlevine
Copy link
Author

Ah, thanks @JonRowe! I was wondering about that while I was doing my testing. Do you know why rspec-rails needs to be included in the development environment? And why are the other gems you mentioned different?

@JonRowe
Copy link
Member

JonRowe commented Jun 22, 2020

Do you know why rspec-rails needs to be included in the development environment?

It doesn't need to be, but you don't get the generators and other nicities if you don't.

And why are the other gems you mentioned different?

This and rspec-core don't integrate with rails so there is no need to include them in the dev environment.

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

No branches or pull requests

2 participants