Error when using rails capybara

For the purpose of this time, as in the following reference article, It was to be able to use the sign_in method when running the rspec test. https://qiita.com/jnchito/items/a8360e5e7a829d1e19b2

Therefore, when I tried to set capybara with rails, I got the following error I'll put a reference link for each error. Also, for the rough settings, I referred to the following article. https://qiita.com/morrr/items/0e24251c049180218db4

undefined method `visit'

https://qiita.com/terufumi1122/items/aefd6c965e9e946efc3b Since visit is a method that can be used with capybara, it seems that the above error will occur unless it is set.

Failure/Error: fill_in 'email', with: user.email 
Capybara::ElementNotFound:
Unable to find field "email" that is not disabled

https://qiita.com/pooooon/items/4fbc429d07e4b65ed928 In my case, I made the following changes and the error disappeared. fill_in 'user[email]', with: user.email fill_in 'user[password]', with: 'password' As mentioned in the article, there are some patterns that are not'session [email]', so you should check them properly with a browser.

Recommended Posts

Error when using rails capybara
Error when using SnapKit
Detailed tips when using Rails
[Note] Error message when using Rails Form object pattern Japanese
[Rails] Japanese localization of error message when using Form object
[Rails] How to solve the error "undefined method` visit'" when using Capybara with Rspec
[Rails] Error resolution when generating tokens with PAYJP
Error handling when Gradle dependency is using SLF4J
[Rails] Solution when migration error occurs in acts-as-taggable-on
Rails <% = expression%> Why no error occurs when empty
[Note] Rails error list
Catch Rails Routing Error
[Rails error] unexpected tIDENTIFIER
rails heroku error log
rails error resolution summary
Error when bundle install
Error when deploying EC2
[Rails] About error resolution when installing devise and activeadmin
Error encountered with notes when deploying docker on rails
I got an error when using nextInt, nextLine and substring.
How to set environment variables when using Payjp with Rails
Search function using [rails] ransack
Try using view_component with rails
rails error Library not loaded
SNS authentication using Rails google
[Rails] Save images using carrierwave
Be careful of initialization timing when using MessageEncryptor with Rails 5.2 / 6.0
Japaneseize using i18n with Rails
[Rails] Japanese localization using rails-i18n
Error in rails db: migrate
[Rails] Test code using Rspec
Organize Rails routing using draw
Error when playing with java
[Rails] Rails version upgrade error memorandum
PG :: DatatypeMismatch error when doing heroku run rails db: migrate
Ajax bookmark function using Rails
[Rails] Encoded by brute force using gsub when getting url! !! !! !!
[Rails] Try using Faraday middleware
SpringBoot + Mybatis error when booting
Error when introducing SNS authentication
[rails] error during devise installation
[Rails 6] Star-shaped review using Raty.js
Things to keep in mind when using Sidekiq with Rails
Remedy for "A server is already running." Error when running rails s
I get a Ruby version error when I try to start Rails.
Solution notes when an error occurs when downloading docker gpg using curl
Avoid character code error in java when using VScode extension RUN-CODE
How to solve the unknown error when using slf4j in Java
The story that the build error did not stop when using Eclipse 2020
Unknown error in line 1 of pom.xml when using Spring Boot in Eclipse
[Rails 5] How to display the password change screen when using devise
Precautions when using checkboxes in Thymeleaf
[Rails] What was the error message?
[Rails] Japanese localization of error messages
Error when npm install on Windows 7
[Hidden_field] Let's send information using rails hidden_field !!!!
[Rails] Tag management function (using acts-as-taggable-on)
[Rails] Unexpected validation error in devise
[Rails 6] API development using GraphQL (Query)
Workspace location when using Jenkins Pipeline
[Rails] Display form error messages asynchronously