ruby - Beginner: Why does terminal command rails g controller pages '' '' perform but no folders are created? -


terminal text editor

i'm following beginners tutorial @ code4startup.com , following video 2, confused why terminal runs command doesnt generate folders video shows. also, 'identical' stated because i've run g command few times? appreciated.

i tried linking code4startup page i'm working not reputable enough 3 links.

i guess steve answered when press rails g blah rails looks in folder in... files , folders supposed create such test folder, css file, views, model whatever generating @ time. if generated tells identical. otherwise, generate them , give green message. not in correct directory. try cd name of project... instance inside cli (command line interface) terminal/bash/command prompt... accessible typing windowkey+space in linux or command+space in mac terminal.... type following commands:

cd mkdir projects cd projects rails new pizzeria cd pizzeria rails g model pizza name:string vegetarian:bool description:text  rails g controller pizzas index show edit rake db:migrate "you error message: undefined method `bool'" --oopsie rails destroy model pizza name vegetarian description rails g model pizza name:string vegetarian:boolean description:text rails s 

this create projects folder, enter projects folder, create new rails project, enter rails project, generate user model, migrate user model active record. start rails server.

after can visit rails project at: http://localhost:3000/ in browser.

your next steps set config/routes routes need pizzeria uncommenting resources: section , filling in pizza.


Comments