-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TurboReflex::Runner failed to append the meta tag to the response! undefined method `invoke' #43
Comments
This happens because TurboReady doesn't auto initialize the client code. I have releases for each lib that should ship today that will address this problem. Here's the first related PR. hopsoft/turbo_boost-streams#26 |
This issue should get resolved with #44 |
This should now be resolved with v0.0.29. Will you give it another shot at let me know if these instructions now work for you? https://github.com/hopsoft/turbo_reflex#setup |
Hmm, still getting same error. My /* eslint no-console:0 */
// Rails functionality
import Rails from "@rails/ujs"
import { Turbo } from "@hotwired/turbo-rails"
import "turbo_reflex"
// Make accessible for Electron and Mobile adapters
window.Rails = Rails
window.Turbo = Turbo
require("@rails/activestorage").start()
import "@rails/actiontext"
// ActionCable Channels
import "./channels"
// Stimulus controllers
import "./controllers"
// Jumpstart Pro & other Functionality
import "./src/**/*"
require("local-time").start()
// Start Rails UJS
Rails.start() I upgraded both gems + npm: diff --git Gemfile Gemfile
index ea339f5..1b2b414 100644
--- Gemfile
+++ Gemfile
@@ -131,6 +131,4 @@ end
# We recommend using strong migrations when your app is in production
# gem "strong_migrations", "~> 0.7.6"
-gem "turbo_reflex", "~> 0.0.28"
+gem "turbo_reflex", "~> 0.0.29"
...
diff --git app/javascript/application.js app/javascript/application.js
index 392f2f1..eb3e59e 100644
--- app/javascript/application.js
+++ app/javascript/application.js
@@ -3,7 +3,8 @@
// Rails functionality
import Rails from "@rails/ujs"
import { Turbo } from "@hotwired/turbo-rails"
+import "turbo_reflex"
// Make accessible for Electron and Mobile adapters
window.Rails = Rails
diff --git package.json package.json
index ed1f33c..9fbcf64 100644
--- package.json
+++ package.json
@@ -26,7 +26,6 @@
"local-time": "^2.1.0",
"postcss": "^8.4.8",
"postcss-import": "^15.0.0",
- "reflex_behaviors": "^0.0.6",
"slim-select": "^2.0.0",
"stimulus-flatpickr": "^3.0.0-0",
"stimulus-hotkeys": "^2.2.0",
@@ -36,8 +35,8 @@
"tippy.js": "^6.3.5",
"tributejs": "^5.1.3",
"trix": "^2.0.0",
- "turbo_ready": "^0.1.2",
- "turbo_reflex": "^0.0.28"
+ "turbo_ready": "^0.1.3",
+ "turbo_reflex": "^0.0.29"
},
"scripts": {
"build:css": "tailwindcss --postcss --minify -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css",
diff --git yarn.lock yarn.lock
index c530c24..2fee0d6 100644
--- yarn.lock
+++ yarn.lock
@@ -44,10 +44,10 @@
resolved "https://registry.yarnpkg.com/@hotwired/turbo/-/turbo-7.2.4.tgz#0d35541be32cfae3b4f78c6ab9138f5b21f28a21"
integrity sha512-c3xlOroHp/cCZHDOuLp6uzQYEbvXBUVaal0puXoGJ9M8L/KHwZ3hQozD4dVeSN9msHWLxxtmPT1TlCN7gFhj4w==
resolve@^1.1.7, resolve@^1.22.1:
version "1.22.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177"
@@ -918,9 +910,9 @@ select@^1.1.2:
integrity sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==
source-map-js@^1.0.2:
version "1.0.2"
@@ -1029,18 +1021,20 @@ tslib@^2.0.1:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e"
integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==
-"turbo_ready@>= 0.1.2", turbo_ready@^0.1.2:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/turbo_ready/-/turbo_ready-0.1.2.tgz#0aa812c0661073106e6efea2f1af41d7b6786e44"
- integrity sha512-CwJJ2sz72cuNBQuECH2K3H8R9Zb8d3jppK61+i+PwMxPXM8dyL3Rj4K23JPR5RnUBQGIPwxmAVdmPXQxQJoYCA==
+"turbo_ready@>= 0.1.3", turbo_ready@^0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/turbo_ready/-/turbo_ready-0.1.3.tgz#e54cd1539a0808307d8e68dbfe5c507af48baf72"
+ integrity sha512-fglj2qohy7llj9Jxj/g9S//uZefE2NdORrRaxu3ZHwLLb7Rge+brgSzDfc6/doa+BReIXwiwd8Yql1k2bGsopg==
dependencies:
"@alpinejs/morph" ">=3.10.4"
alpinejs ">=3.10.4"
-"turbo_reflex@>= 0.0.28", turbo_reflex@^0.0.28:
- version "0.0.28"
- resolved "https://registry.yarnpkg.com/turbo_reflex/-/turbo_reflex-0.0.28.tgz#2e01bf26193a64094b83213a0c03044f7564c138"
- integrity sha512-hynGvxk1YdA/ubn3eBNaVY7iv9z2TFy/d4vsIYJdPmyFkF1KuG/5SYhxq137I4eDtpLO+JuzU8/wJmc24OOJuQ==
+turbo_reflex@^0.0.29:
+ version "0.0.29"
+ resolved "https://registry.yarnpkg.com/turbo_reflex/-/turbo_reflex-0.0.29.tgz#c2341e6ea7b880d1a9051d7d2b4792a84079ffe9"
+ integrity sha512-dl/iEAll86laCR5bFpJIL2/ldWbr0LwdFjZ+6neFTTtroHH51bSgObHVFWqbxM0KP17YxpVGRgSj+s7EEKvKyQ==
+ dependencies:
+ turbo_ready ">= 0.1.3"
update-browserslist-db@^1.0.9:
version "1.0.10" My javascript console logs look happy:
My <meta id="turbo-reflex" name="turbo-reflex" content="BAhJIhVlalpyT2UyLUZ6T2tmYTVJBjoGRUY=--bfc7a59241fd8ef22489b257f7a8aefd3af81213ff0872dad8ffae8a99378831" data-busy="false" data-state="e30"> But
I also tried following install instructions in to fresh jumpstart_pro app and get same result. /cc @excid3 perhaps could @hopsoft have access to JSP if it helps him debug the startup sequence of turbo_reflex? |
I wonder if it's related to how you're importing Turbo. The latest turbo libs implicitly expose the global So this code. import { Turbo } from "@hotwired/turbo-rails"
window.Turbo = Turbo Could be changed to. import "@hotwired/turbo-rails"
// Both window.Turbo and Turbo will implicitly be setup for you I wonder if I should expose an option to explicitly register/initialize TurboReady's stream actions where you pass in either |
After initialization you should see that |
The error is from Ruby, so what's the Javascript piece have to do with it? |
Ah yeah. Been chasing a different but similar problem on the client. This looks like you may just be missing the |
I'll be back in couple hours to try/relook |
Ok I manually diff --git Gemfile Gemfile
index 1b2b414..6038062 100644
--- Gemfile
+++ Gemfile
@@ -132,3 +132,5 @@ end
# gem "strong_migrations", "~> 0.7.6"
gem "turbo_reflex", "~> 0.0.29"
+
+gem "turbo_ready", "~> 0.1.3"
diff --git Gemfile.lock Gemfile.lock
index c53acc6..4644a7b 100644
--- Gemfile.lock
+++ Gemfile.lock
@@ -593,6 +593,7 @@ DEPENDENCIES
standard
stimulus-rails (~> 1.0, >= 1.0.2)
turbo-rails (~> 1.0, >= 1.0.1)
+ turbo_ready (~> 0.1.3)
turbo_reflex (~> 0.0.29)
tzinfo-data
vcr (~> 6.1) |
I guess |
Good news. #48 requires the TurboReady dependency for you implicitly which will resolve this problem. |
Just realized you did the same with #46 |
I followed installation instructions:
But whilst my pages load ok, in my logs I see:
Something extra I need to install or configure?
In my
Gemfile.lock
I have rails :And
yarn.lock
:Update: I've also tried explicitly installing
turbo_ready
but afaict the only additional instructions were javascript related -yarn add
andimport TurboReady
etc.Any protips to get my rails 7/jumpstart pro app to pickup turbo_ready's
invoke
helper?The text was updated successfully, but these errors were encountered: