Activity
Hi!
I am deploying a rails 7 app (7.2.2) on ruby 3.3.5 with an AR adapter for sqlserver (activerecord-sqlserver-adapter). As of version 7.2 the adapters have to to register themselves with AR in order to work. It does that but after a connection attempt is being made, i.e. when starting the rails console. The packaged adapters (mysql…) are there in time, the sqlserver one is loaded to late.
It works in developemt mode and on the staging system, not in production.
What am I missing?
Disclaimer: i posted this question on discuss.rubyonrails.org
Posted in Rails Application Templates Discussion
Hi!
I came across an error when I was trying to generate a scaffold:
I came across an error when I was trying to generate a scaffold:
(erb):1:in `template': undefined local variable or method `model_resource_name' for #<Erb::Generators::ScaffoldGenerator:0x00007fd4e005ccf8> (NameError)
I had to replace every occurrence of model_resource_name with singular_name in the file lib/templates/erb/scaffold/_form.html.erb in the newly created app folder.
Example:
<%%= form_with(model: <%= model_resource_name %>, local: true) do |form| %>
becomes
<%%= form_with(model: <%= singular_name %>, local: true) do |form| %>
Best regards,
Mark
HI there,
i had the problem too. Could fix it with:
i had the problem too. Could fix it with:
yarn install
If you have get the message "can't find executable webpack for gem webpacker" along the way you can fix it with:
bundle exec rails webpacker:binstubs
Hints came from: