简体   繁体   中英

Rails Could not find generator via command line in Windows

I'm brand new in Ruby. I'm following this Ruby tutorial. Everything seems fine till 4.1, but in 4.2 when I run ruby bin\\rails generate controller welcome index in cmd, it says Could not find generator welcome. Following are my windows setup details:

Ruby version: 2.1.5

Rails version: 4.1.8

Please forgive my silly mistakes if there are any.

its for Linux

$ bin/rails generate controller welcome index

for windows try

$ rails generate controller welcome index

the later one also works for other OSes. or for more info try

rails g controller --help

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM