From 26233cd361aec18dc7f859cf1454a7296056e2e2 Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Fri, 10 Oct 2025 15:11:36 -1000 Subject: [PATCH] Fix install_folder path in generator initializer template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The generator was setting install_folder to include the framework subdirectory (e.g., e2e/cypress), but the correct path should be just the install folder (e.g., e2e) where the cypress.config.js file is located. This fixes the issue where Cypress couldn't find the config file after running the install generator. Fixes #201 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../templates/config/initializers/cypress_on_rails.rb.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generators/cypress_on_rails/templates/config/initializers/cypress_on_rails.rb.erb b/lib/generators/cypress_on_rails/templates/config/initializers/cypress_on_rails.rb.erb index afc3a22..decf1b2 100644 --- a/lib/generators/cypress_on_rails/templates/config/initializers/cypress_on_rails.rb.erb +++ b/lib/generators/cypress_on_rails/templates/config/initializers/cypress_on_rails.rb.erb @@ -1,7 +1,7 @@ if defined?(CypressOnRails) CypressOnRails.configure do |c| c.api_prefix = "<%= options.api_prefix %>" - c.install_folder = File.expand_path("#{__dir__}/../../<%= options.install_folder %>/<%= options.framework %>") + c.install_folder = File.expand_path("#{__dir__}/../../<%= options.install_folder %>") # WARNING!! CypressOnRails can execute arbitrary ruby code # please use with extra caution if enabling on hosted servers or starting your local server on 0.0.0.0 c.use_middleware = !Rails.env.production?