straight-mechanic-78430
10/27/2022, 4:40 PMripe-article-50191
10/28/2022, 6:09 AMdocument.addEventListener('DOMContentLoaded', (event) => {...})
document.addEventListener('turbo:load', (event) => {...})
$(document).on( 'turbo:load', function(event) {...})
$(function(){...})
I don't know if AVO gem environment needs another code to fire on load events
Thanks in advance.mammoth-guitar-49791
10/28/2022, 11:46 AMstraight-mechanic-78430
10/28/2022, 11:57 AMstraight-mechanic-78430
10/28/2022, 12:05 PMmammoth-guitar-49791
10/28/2022, 12:48 PM❯ bin/dev
system | Tmux socket name: overmind-avo-Fd5UUGjQpgdnKu-SsLXfB
system | Tmux session ID: avo
system | Listening at ./.overmind.sock
css | Started with pid 59971...
cjs | Started with pid 59972...
web | Started with pid 59969...
js | Started with pid 59970...
yarn run v1.22.19
$ esbuild app/javascript/*.js --bundle --sourcemap --outdir=app/assets/builds --watch
yarn run v1.22.19
yarn run v1.22.19
$ tailwindcss -i ./app/assets/stylesheets/avo.base.css -o ./app/assets/builds/avo.base.css --postcss --watch
$ esbuild spec/dummy/app/javascript/*.js --bundle --sourcemap --minify --outdir=app/assets/builds --watch
cjs | [watch] build finished, watching for changes...
js | [watch] build finished, watching for changes...
css |
css | Rebuilding...
css | Done in 1758ms.
web | => Booting Puma
web | => Rails 6.1.6.1 application starting in development
web | => Run `bin/rails server --help` for more startup options
web | Puma starting in single mode...
web | * Puma version: 5.6.4 (ruby 3.1.0-p0) ("Birdie's Version")
web | * Min threads: 5
web | * Max threads: 5
web | * Environment: development
web | * PID: 59973
web | * Listening on http://127.0.0.1:3030
web | * Listening on http://[::1]:3030
web | Use Ctrl-C to stop
web | Started GET "/" for 127.0.0.1 at 2022-10-28 14:45:14 +0200
web |
web | ActiveRecord::ConnectionNotEstablished (connection to server at "::1", port 5432 failed: Connection refused
web | Is the server running on that host and accepting TCP/IP connections?
web | ):
web |
web | activerecord (6.1.6.1) lib/active_record/connection_adapters/postgresql_adapter.rb:83:in `rescue in new_client'
'
lemon-wall-20836
10/28/2022, 3:23 PMstrong-restaurant-36788
11/01/2022, 1:18 AMlemon-wall-20836
11/01/2022, 7:49 AMdamp-truck-72770
11/04/2022, 6:11 AMlemon-wall-20836
11/04/2022, 9:28 AMdamp-truck-72770
11/05/2022, 12:34 AMNov 4 05:26:23 PM [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08] ActionView::Template::Error (key must be 32 bytes):
Nov 4 05:26:23 PM [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08] 1: <%= render Avo::TurboFrameWrapperComponent.new(params[:turbo_frame]) do %>
Nov 4 05:26:23 PM [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08] 2: <%= render Avo::Views::ResourceIndexComponent.new(
Nov 4 05:26:23 PM [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08] 3: resource: @resource,
Nov 4 05:26:23 PM [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08] 4: resources: @resources,
Nov 4 05:26:23 PM [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08] 5: models: @models,
Nov 4 05:26:23 PM [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08]
Nov 4 05:26:23 PM [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08] activesupport (7.0.3.1) lib/active_support/message_encryptor.rb:172:in `key='
Nov 4 05:26:23 PM [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08] activesupport (7.0.3.1) lib/active_support/message_encryptor.rb:172:in `_encrypt'
Nov 4 05:26:23 PM [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08] activesupport (7.0.3.1) lib/active_support/message_encryptor.rb:154:in `encrypt_and_sign'
Nov 4 05:26:23 PM [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08] avo (2.18.1) lib/avo/services/encryption_service.rb:25:in `encrypt'
Nov 4 05:26:23 PM [4cfd4e00-2ba1-4c9d-bad6-fc952b421f08] avo (2.18.1) lib/avo/services/encryption_service.rb:10:in `encrypt'
lemon-wall-20836
11/05/2022, 8:21 AMquiet-winter-98496
11/07/2022, 11:11 AMlemon-wall-20836
11/07/2022, 12:06 PMthankful-stone-82785
11/07/2022, 2:57 PMlemon-wall-20836
11/07/2022, 3:34 PMripe-article-50191
11/08/2022, 11:53 AMmodern-ambulance-83380
11/08/2022, 3:42 PMbin/rails g avo:tool map
and my _head.html.erb
looks like this:
<%= javascript_importmap_tags "avo.custom" %>
<script src="https://maps.googleapis.com/maps/api/js?key=<%= Rails.application.credentials[:google_maps_js_api_key] %>&callback=initMap" data-turbolinks-eval="false"></script>
- then i've added the callback function initMap
to avo.custom.js
Expected result:
- the callback function initMap
should be triggered as soon as the google maps script is loaded
Actual result:
- a JS exception "initMap is not a function" is raised
Assumption:
- i assume, that the load-order is somehow messed.
Question:
- What do i need to do to get this fixed? Is this even the recommended way of loading external scripts in Rails 7? I've seen Chris Oliver from GoRails do it the same, but it still feels kind of strange. Unfortunately I am still a bit lost with importmaps etc. in Rails 7.lemon-wall-20836
11/08/2022, 4:02 PMlemon-wall-20836
11/08/2022, 4:03 PMripe-article-50191
11/09/2022, 6:59 AMripe-article-50191
11/09/2022, 7:11 AMdomain.com/locale/resources/../..
for english and spanish (/en/
and /es/
)
I have followed the docs instructions about how to configure .yml files.
It appears to work but the problem is that independent if I put /en/
or /es/
always appears the spanish translations.
Any idea?lemon-wall-20836
11/09/2022, 7:58 AMbright-tomato-27372
11/09/2022, 8:03 AMZeitwerk::Error in Avo::StylesController#index
and /YOUR_RAILS_PATH_HERE/app/avo/dashboards is not a directory
, you just have to create an empty dashboards
directory inside your avo
directory.
I was running 2.18.1 and updated to 2.19.0. I didn't have any dashboards so this directory was never created / needed. Hope this helps someone in case they find it here!straight-mechanic-78430
11/09/2022, 10:39 AMthankful-stone-82785
11/09/2022, 2:55 PMshow_controls
only works on Show
pages but those do not have a form
available to use 🤷♂️lemon-wall-20836
11/09/2022, 3:23 PMlemon-wall-20836
11/09/2022, 3:26 PMgreat-honey-61237
11/09/2022, 3:29 PMAction
which references the models
that have been selected?