Spring should be suspected when Rails commands do not work properly

Motivation

When I typed the following command while creating test code using Rails, it did not work properly, so I described how it was solved as a memorandum.

$ rails g rspec:request article


Running via Spring preloader in process 15349
Deprecation warning: Expected boolean default value for '--orm'; got :active_record (string).
This will be rejected in the future unless you explicitly pass the options `check_default_type: false` or call `allow_incompatible_default_type!` in your code
You can silence deprecations warning by setting the environment variable THOR_SILENCE_DEPRECATION.
Could not find generator 'rspec:request'. Maybe you meant "rspec:decorator"?
Run `rails generate --help` for more options.

What is spring?

It ’s crazy "A Rails application preloader that keeps the application you're developing in the background to speed up development and eliminates the need to launch" Test rake task migration "every time."

It may be a problem that the process here remains, as it looks like a good guy.

Solution procedure

First, check the status of spring

$ spring status


Spring is running:

 3729 spring server | blogapp | started 17 hours ago

After all it was stopped.

Next, stop spring.

$ spring stop
Spring stopped.

Check the status again

$ spring status
Spring is not running.

Rails command execution again

$ rails g rspec:request article
Running via Spring preloader in process 15565
      create  spec/requests/articles_spec.rb

Succeeded!

If you perform the command operation again, spring will also be executed, so don't worry.

If you get an error you don't remember, suspect spring

Recommended Posts

Spring should be suspected when Rails commands do not work properly
When @Transactional of Spring Boot does not work
[Java] When var should be used and when it should not be used
[Ruby on Rails] When parameter id acquisition does not work
[Rails 5] [Turbolinks] What to do when JS does not work due to page transition or browser back
[Rails] What to do when rails s does not respond or does not stop
[Beginner] When rails s doesn't work
Settings that should be done when operating a production environment with Rails
When the form such as Select of Materialize does not work properly
JSESSIONID could not be assigned to the URL when using Spring Security