application.js 未在 rails 应用上加载;无法清除 tmp 存储。安全错误; Chrome
application.js not loading on rails app; Failed to clear tmp storage. Security Error ; Chrome
我有一个 rails 应用程序(在开发服务器上),但未从浏览器加载 application.js
文件。当我从浏览器 ex: myapp.com/assets/application.js-fingerprint
直接调用 application.js
文件时,它会加载 javascript。
我做了以下事情,我怀疑我可能做错了某些事情。
- 我在开发服务器上部署了应用程序
- 运行
RAILS_ENV='dev' bundle exec rake assets:clean
- 之后
RAILS_ENV='dev' bundle exec rake assets:clobber
- 终于
RAILS_ENV='dev' bundle exec rake assets:precompile
touch tmp/restart.txt
(重启客运)
sudo service httpd restart
(虽然我知道重启apache是多余的,但我还是继续这样做了)
我使用 Apache,Rails 4.0,Capistrano 2.X。
如果有人能指出正确的方向,我将不胜感激。
更新:
- 这是一个 AWS 实例 运行 Amazon linux(CentOS 的味道)
- 我在 chrome 开发人员工具的 javascript 控制台上收到以下消息。
Failed to clear temp storage: It was determined that certain files
are unsafe for access within a Web application, or that too many calls
are being made on file resources. SecurityError
我通常 运行 rake assets:precompile 和服务 apache2 在我服务器上的应用程序的根目录上重新加载。尝试服务 apache2 重新加载
我有一个 rails 应用程序(在开发服务器上),但未从浏览器加载 application.js
文件。当我从浏览器 ex: myapp.com/assets/application.js-fingerprint
直接调用 application.js
文件时,它会加载 javascript。
我做了以下事情,我怀疑我可能做错了某些事情。
- 我在开发服务器上部署了应用程序
- 运行
RAILS_ENV='dev' bundle exec rake assets:clean
- 之后
RAILS_ENV='dev' bundle exec rake assets:clobber
- 终于
RAILS_ENV='dev' bundle exec rake assets:precompile
touch tmp/restart.txt
(重启客运)sudo service httpd restart
(虽然我知道重启apache是多余的,但我还是继续这样做了)
我使用 Apache,Rails 4.0,Capistrano 2.X。
如果有人能指出正确的方向,我将不胜感激。
更新:
- 这是一个 AWS 实例 运行 Amazon linux(CentOS 的味道)
- 我在 chrome 开发人员工具的 javascript 控制台上收到以下消息。
Failed to clear temp storage: It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources. SecurityError
我通常 运行 rake assets:precompile 和服务 apache2 在我服务器上的应用程序的根目录上重新加载。尝试服务 apache2 重新加载