我新的轨道,我是能够安装导轨(3.2.3,红宝石v1.9.3),然后创建一个测试应用程序:轨初学者,创建2个Rails应用程序在本地开发
$轨新的Hello
然后我cd'd到新目录“你好”,做了下面的命令:
$ rails generate controller home index
$ rails s
$ rake routes, it gave me
home_index GET /home/index(.:format) home#index
hello /hello(.:format) Hello#index
然后我指出我的浏览器:http://localhost:3000/home/index - 和它的工作很大。
然后我想开始一个教程,它要求我创建一个新的Rails应用程序
所以我没有再像以前那样...
$ rails new TutorialApp
$ rails generate controller tutorial index
$ rails s
$ rake routes, it gave me
tutorial_index GET /tutorial/index(.:format) tutorial#index
然后我指出我的浏览器:http://localhost:3000/tutorial/index ,它给了我
路由错误的消息
没有路由匹配[GET]“/吨utorial/index“尝试运行耙路线 有关可用路线的更多信息。
于是我又跑耙路线,它给了我同样的输出,因为它
tutorial_index GET /tutorial/index(.:format) tutorial#index
以前那样因为我创建的第一个Rails应用程序“你好”,我需要关闭该应用程序在启动新的rails应用程序“教程”之前还是可以同时运行?
任何帮助表示赞赏,谢谢!
我有一个rails_app目录存储不同的rails应用程序,我在目录中有两个文件夹:hello和tutorial。在导入新的教程之前,我已经从hello目录中解脱出来了。 – Brad
谢谢!我做了CTRL-C,并尝试localhost:3000 /教程/索引,它的工作! – Brad