Mark Hapke

Joined

20 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in Rails Application Templates Discussion

Hi!

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

Posted in Rails & Vue.js Trello Clone - Part 1 Discussion

HI there, 

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:
logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.