0

When I use scaffold to generate it works in terminal but when you see in code editor there are no files created I have already destroyed and created but that also doesn't work.

Punya
  • 353
  • 1
  • 3
  • 12
  • Is your editor opened in the directory Desktop/rail/devise-app ? – Danilo Cândido Apr 27 '18 at 00:05
  • yes it is open with same folder – Punya Apr 27 '18 at 00:06
  • 4
    Try closing and re-openiing your editor. – Ryan Bigg Apr 27 '18 at 00:34
  • Can you try `ls` and `pwd` in the terminal... also can you show us the rest of the generate command you're using? (it's unlikely to be anything weird, but always worth checking every detail just in case) Also - what's that error-message i can see in your editor... it could be hanging on your user-input before reloading the directory properly... – Taryn East Apr 27 '18 at 00:36
  • Why did you put bundle exec before? I would normally use 'rails g scaffold User...' – Rcordoval Apr 27 '18 at 02:10
  • VSCode has problems displaying the generated files. I've met this with migrations. Look at your folder from terminal and not from editor. – cnnr Apr 27 '18 at 05:35

3 Answers3

0

It's not a RoR scaffold issue. You can manually refresh you project via editor built-in tools.

My current VSCOde version 1.22.2, controls show on mouse over tab

VSCode Version 1.22.2

cnnr
  • 1,267
  • 4
  • 18
  • 23
-1

it may be your visual studio code refresh issue, you try simple without bundle exec

rails generate scaffold Post name:string title:string content:text
vipin
  • 2,374
  • 1
  • 19
  • 36
-1

it not just an editor issue which is VScode so what I have done to solve is if you run the scaffold again if it says identical and not showing in code editor/ window explorer or finder first quit everything and restart your computer and if you check your editor you may still not see any file then run the scaffold generator again at this time it will say it is created and you can see everything in editor.

Punya
  • 353
  • 1
  • 3
  • 12