【发布时间】:2016-09-21 16:48:46
【问题描述】:
导航到我的应用主页中的链接页面时出现此错误。
我正在使用 Nginx 和Passenger
在application/_header.html.erb 文件中,我有此行作为链接:
<li><%= link_to 'Comments', comments_path, method: "get" %></li>
在routes.rb 我有:
root to: "application#index"
resources :comments
我的/etc/nginx/sites-available/default 是
server {
listen 80 default_server;
listen [::]:80 default_server;
root /home/ubuntu/test-aws-deploy-with-git-ec2-rds/public;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name ec2-54-173-78-253.compute-1.amazonaws.com;
location / {
proxy_pass http://127.0.0.1:4000;
proxy_http_version 1.1;
proxy_buffering off;
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
}
不知道为什么我无法在此应用中的页面之间导航? 我需要在某个地方指定此应用将使用的任何页面吗?
【问题讨论】:
标签: ruby-on-rails nginx amazon-ec2 passenger