我正在尝试修复我的链接:
http://92.51.243.6/
不知道为什么他们不工作。我所说的链接是页面顶部的“主页”和“关于”。在本地 WEBrick 模式下一切正常。我听说 Ajax 可能是问题所在,所以我从这些链接中取出了 :remote=> true,并在文件 scripts.js 中禁用了 ajax,它负责处理我的 ajax。
链接中的代码是:
<div id = "menu">
<ul id = "home_page_links">
<li><%= link_to "Home",about_us_path %></li>
<li><%= link_to "About Us",about_us_path %></li>
</ul>
</div>
在我的 routes.rb 文件中,我有:
QuestionnaireSite::Application.routes.draw do
get "home", :to => "static_pages#about_us"
get "about_us", :to => "static_pages#about_us"
我收到的消息“我们很抱歉,但出了点问题”是我公用文件夹中的错误页面。
当我运行时:
tail -f /var/www/apps/myapp/current/log/production.log
我得到:
Started GET "/users/sign_in" for 87.198.119.247 at Thu May 30 10:52:04 +0100 2013
Processing by Devise::SessionsController#new as HTML
Rendered users/sessions/new.html.erb within layouts/devise (4.4ms)
Rendered layouts/_fb_init.html.erb (0.1ms)
Rendered layouts/_signed_out_header.html.erb (0.7ms)
Rendered layouts/_messages.html.erb (0.1ms)
Completed 200 OK in 10ms (Views: 7.5ms | ActiveRecord: 0.3ms)
Started GET "/about_us" for 87.198.119.247 at Thu May 30 11:02:29 +0100 2013
Processing by StaticPagesController#about_us as HTML
Rendered static_pages/about_us.html.erb within layouts/application (0.0ms)
Completed 500 Internal Server Error in 4ms
ActionView::Template::Error (ie.css isn't precompiled):
12: <%= javascript_include_tag "application" %>
13: <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
14: <!--[if lt IE 9]>
15: <%= stylesheet_link_tag 'ie', :media => 'all' %>
16: <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
17: <![endif]-->
18: </head>
app/views/layouts/application.html.erb:15:in `_app_views_layouts_application_html_erb___1658874457_26880020'
所以我得到一个错误:ie.css 没有预编译。
根据我的错误消息,我需要在第 12 行到第 18 行更改什么吗?我确实这样做了:
rake assets:precompile
正如我得到的那样,这似乎已经成功完成:
/home/app/.rvm/rubies/ree-1.8.7-2012.02/bin/ruby /home/app/.rvm/gems/ree-1.8.7-2012.02@global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
我错过了什么吗?