This is the first part in a short series we’re doing on building a rails app with a React enabled frontend. There are a number of ways to utilize React in a Rails 5.2 application, and after toying with different ideas and approaches we landed on using the
webpacker gem to get things going with webpack as a monolith instead of having separate applications for frontend and backend.
To help rails development teams manage credentials, Rails 5.2 introduces a new Credentials Api. Credentials are stored in a file called
config/credentials.yml.enc in an encrypted form, so they are safe to be committed to source control. This eliminates the pain of synchronizing modified keys across the team.
While attempting to set a required cookie manually using ChromeDriver to run an integration test, I came across this error:
Selenium::WebDriver::Error::NoSuchCollectionError: unable to set cookie
I was using the right approach to set the cookie, but chromedriver was not having it:
Moving to Docker or Foreman for rails development requires learning some new debugging and testing strategies. If you’re like me, you drop
binding.pry in every feature you build at one point or another.