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

Spring didn't restart after changes to Gemfile and config/application.rb #611

Open
matt17r opened this issue Mar 9, 2020 · 1 comment
Open

Comments

@matt17r
Copy link

matt17r commented Mar 9, 2020

I had an issue where the dotenv-rails gem wasn't being loaded in my console. After lots of investigating I eventually ran spring stop and that fixed the issue.

In trying to learn more about Spring I've just read the README which says that:

But if we edit any of the files which were used to start the application (configs, initializers, your gemfile), the application needs to be fully restarted. This happens automatically.

In my case this didn't happen... I added the Gem to my Gemfile and spring mustn't have restarted. I later added Dotenv::Railtie.load to config/application.rb and spring still didn't restart.

How can I investigate why these changes weren't detected automagically in my case?

I'm using macOS Catalina, Terminal, and fish shell. I'm using Rails 6.0.2.1 and asdf to manage versions.

My spring.rb file is unchanged from the default (although now I'm wondering if I should add ".tool-versions" to detect changes in Ruby versions from asdf):

Spring.watch(
  ".ruby-version",
  ".rbenv-vars",
  "tmp/restart.txt",
  "tmp/caching-dev.txt"
)
@justin808
Copy link

Try adding ".env" to that list.

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