我是 Rails 开发的新手,而且有点乱!我已经获得了一个代码库,并且 HTML 中没有引用任何资产。没有失败的网络请求,它们根本没有包含在标记中!当我尝试使用他们的 URL 直接访问它们时,它们就在那里。
作为比较 - 我的同事系统最终会收到大约 30 个左右的请求,并且最终结果是完全样式化的。但是我没有样式,只有基本标记。
我已经阅读了大量内容并检查了我的配置,检查了我是否在开发模式下运行等等。我真的很难过!
值得一提的是,我目前在一个跨平台的团队环境中工作,那里有使用 Linux、Windows 和 Mac OS X 的开发人员。没有人有这些问题;而且我很确定其他使用 Mac OS X 的开发人员的设置与我的完全相同!
源代码是从与其他人相同的 git 存储库中获取的,并且绝对是最新的。下面是 rails 的输出:注意没有错误。
=> Booting WEBrick
=> Rails 3.2.6 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
SECURITY WARNING: No secret option provided to Rack::Session::Cookie.
This poses a security threat. It is strongly recommended that you
provide a secret to prevent exploits that may be possible from crafted
cookies. This will not be supported in future versions of Rack, and
future versions will even invalidate your existing user cookies.
Called from: /******************/abstract_store.rb:28:in `initialize'.
[2013-04-17 21:20:55] INFO WEBrick 1.3.1
[2013-04-17 21:20:55] INFO ruby 2.0.0 (2013-02-24) [x86_64-darwin12.3.0]
[2013-04-17 21:20:55] INFO WEBrick::HTTPServer#start: pid=22421 port=3000
Started GET "/" for 127.0.0.1 at 2013-04-17 21:21:05 +0100
Processing by AccountsController#home as HTML
Completed 401 Unauthorized in 6ms
Started GET "/users/sign_in" for 127.0.0.1 at 2013-04-17 21:21:05 +0100
Processing by Devise::SessionsController#new as HTML
Rendered devise/shared/_links.erb (1.5ms)
Rendered devise/sessions/new.html.erb within layouts/application (10.0ms)
Rendered layouts/_navigation.html.erb (1.0ms)
Rendered layouts/_messages.html.erb (0.3ms)
Completed 200 OK in 776ms (Views: 86.5ms | ActiveRecord: 647.5ms)
Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2013-04-17 21:21:06 +0100
Served asset /application.js - 304 Not Modified (1ms)
Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2013-04-17 21:21:06 +0100
Served asset /application.css - 304 Not Modified (1ms)
注意:application.js 似乎只有 5 个//=require
指令;并且 application.css 主要包含一些简单规则的注释 - 远不及应该存在的内容。