Skip to Main Content
Modern Front-End Development for Rails, 2nd Edition
book

Modern Front-End Development for Rails, 2nd Edition

by Noel Rappin
September 2022
Intermediate to advanced content levelIntermediate to advanced
410 pages
10h 7m
English
Pragmatic Bookshelf
Content preview from Modern Front-End Development for Rails, 2nd Edition

Installing Cypress

Setting up Cypress involves two different steps. First, we need to install Cypress itself and then install the cypress-rails gem to help us integrate Cypress into our system.

Install Cypress as a package:

 $ ​​yarn​​ ​​add​​ ​​--dev​​ ​​cypress

On the Rails side, we need to make sure we have two gems: the cypress-rails gem and the dotenv gem. The gems both go in the Gemfile in the development and test groups, they are already in place in the sample code:

 group ​:development​, ​:test​ ​do
 # <existing gems...>
  gem ​"cypress-rails"
  gem ​"dotenv-rails"
 end

The cypress-rails gem uses environment variables to manage some settings, so to make our life a little easier, we’re going to use the dotenv gem. Do a bundle ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Modern Front-End Development for Rails

Modern Front-End Development for Rails

Noel Rappin

Publisher Resources

ISBN: 9781680509977Errata Page