Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Now a very good news : integrating Cypress to Rails is really simple, because there's already a gem for that. Thanks to the amazing work of the teamdouble team. Their corresponding GitHub repository is here.
mkdir rails-with-cypress && cd rails-with-cypress echo "source 'https://rubygems.org'" > Gemfile echo "gem 'rails', '7.0.0'" >> Gemfile bundle install bundle exec rails new . --force --css=bootstrap -d=postgresql bundle update # Create a default controller echo "class HomeController < ApplicationController" > app/controllers/home_controller.rb echo "end" >> app/controllers/home_controller.rb # Create another controller (the one that should not be reached without proper authentication) echo "class OtherController < ApplicationController" > app/controllers/other_controller.rb echo "end" >> app/controllers/other_controller.rb # Create routes echo "Rails.application.routes.draw do" > config/routes.rb echo ' get "home/index"' >> config/routes.rb echo ' get "other/index"' >> config/routes.rb echo ' root to: "home#index"' >> config/routes.rb echo 'end' >> config/routes.rb # Create a default view mkdir app/views/home echo 'This is home' > app/views/home/index.html.erb echo '<%= link_to "go to other page", other_index_path %>' >> app/views/home/index.html.erb # Create another view (will be also protected by authentication) mkdir app/views/other echo 'This is another page' > app/views/other/index.html.erb echo '<%= link_to "go to home page", root_path %>' >> app/views/other/index.html.erb # Create database and schema.rb bin/rails db:create bin/rails db:migrate