Rails没有按照生产中的routes.rb中的定义正确路由

时间:2017-08-29 12:47:06

标签: ruby-on-rails ruby-on-rails-4 ruby-on-rails-5

如果公共目录中存在索引页面,则当我输入URL时,它将在浏览器中打开 printf("All individuals have the same age of %d", &age1); 页面。

如果我从公共目录中删除index.html文件,它将显示localhost Apache页面。

但是根据路由,它应该在家庭控制器中显示index.html

我将虚拟主机设置为:

index.html.erb

我在<VirtualHost *:80> ServerName rapp.dev # !!! Be sure to point DocumentRoot to 'public'! DocumentRoot /var/www/html/rapp/public <Directory /var/www/html/rapp/public> # This relaxes Apache security settings. AllowOverride All # MultiViews must be turned off. Options -MultiViews </Directory> </VirtualHost> 文件中的路由:

routing.rb

0 个答案:

没有答案