You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not entirely sure if I found a bug, if I shot myself in the foot, or if things were accidentally working before when they should not have.
I'm building an app and bundling edge rails with gem 'rails', github: 'rails/rails' in my Gemfile.
I'm using cypress-on-rails in test and development. Perhaps this is where I initially went wrong. One way or another, I was using the gem and it was working as recently as Jul 11, 2020 at 04:40pm MT.
Today I ran bundle update this morning to fix a Sprockets bug. Then I ran cypress-on-rails and started receiving this error in my development server log:
ActionController::RoutingError (No route matches [POST] "/__cypress__/command"):
My first assumption was that something with edge rails (v6.0.3.2 as of today) was breaking something and y'all weren't yet aware of it. So I rolled back through versions and continued to get the same issue. I wanted to pinpoint it so I could bring it to your attention and let you know if a specific version of Rails might break your gem.
I went one-by-one all the way back down to Rails 6.0.0 and still got the issues. At that point I thought maybe it wasn't Rails, but something in the gem. I jumped back up to edge rails and ran bin/rails g cypress_on_rails:update to see if I was missing some updated necessary config. Still no luck.
I looked through the files the installer writes through, and figured that config/initializers/cypress_on_rails.rb is probably the place where those routes are added. I noticed the line:
And everything is working. Using Rails 6.1.0.alpha, bundled from edge. Looks like the cypress-on-rails version is 1.7.0.
Looking through recent PRs to your gem, it looks like maybe #62 changed the prior behavior. Again, I think I shouldn't be running this in development, I just kind of am because I made a bad choice. It used to work, now it does not. Is that the intended effect, to lock it down to test environments only? If so, I'll go and fix up my project to work the way you intended. But if it's supposed to be available in development, then maybe there is a bug.
Thanks for your time and the great gem. Really appreciate it!
The text was updated successfully, but these errors were encountered:
thanks @ogdenstudios for all the details and apologizes for causing any issues.
use_middleware is a flag that is suppose to make it possible to effectively turn off cypress-on-rails even though the gem is loaded. #62 actually made it start working. So i guess in a sense the right answer could of been to rather deprecate it as it was never working in the first place, maybe if it gave it a bit more thought i would of opted for this.
I use cypress-on-rails in development on my local and in test on CI, I have already update my config to:
Hey everyone,
I'm not entirely sure if I found a bug, if I shot myself in the foot, or if things were accidentally working before when they should not have.
I'm building an app and bundling edge rails with
gem 'rails', github: 'rails/rails'
in myGemfile
.I'm using cypress-on-rails in test and development. Perhaps this is where I initially went wrong. One way or another, I was using the gem and it was working as recently as Jul 11, 2020 at 04:40pm MT.
Today I ran
bundle update
this morning to fix a Sprockets bug. Then I ran cypress-on-rails and started receiving this error in my development server log:My first assumption was that something with edge rails (v6.0.3.2 as of today) was breaking something and y'all weren't yet aware of it. So I rolled back through versions and continued to get the same issue. I wanted to pinpoint it so I could bring it to your attention and let you know if a specific version of Rails might break your gem.
I went one-by-one all the way back down to Rails 6.0.0 and still got the issues. At that point I thought maybe it wasn't Rails, but something in the gem. I jumped back up to edge rails and ran
bin/rails g cypress_on_rails:update
to see if I was missing some updated necessary config. Still no luck.I looked through the files the installer writes through, and figured that
config/initializers/cypress_on_rails.rb
is probably the place where those routes are added. I noticed the line:And I monkey-patched it locally to
And everything is working. Using Rails 6.1.0.alpha, bundled from edge. Looks like the cypress-on-rails version is 1.7.0.
Looking through recent PRs to your gem, it looks like maybe #62 changed the prior behavior. Again, I think I shouldn't be running this in development, I just kind of am because I made a bad choice. It used to work, now it does not. Is that the intended effect, to lock it down to test environments only? If so, I'll go and fix up my project to work the way you intended. But if it's supposed to be available in development, then maybe there is a bug.
Thanks for your time and the great gem. Really appreciate it!
The text was updated successfully, but these errors were encountered: