Rails application.js 无内容和 SECURITY WARNING Rack::Session::Cookie

如果遇到这些情况时:

  • 访问 http://localhost:3000/assets/application.js 还是显示 //= require jquery ,没有生成JS
  • 执行 rails s 时发现 SECURITY WARNING: No secret option provided to Rack::Session::Cookie. 错误

解决方法是删除所有gems,然后重装最新的rails,第一个问题可能是安装问题,第二个问题在新版rails中已解决。

删除所有gems的命令:

for i in `gem list --no-versions`; do gem uninstall -aIx $i; done
Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com 徽标

You are commenting using your WordPress.com account. Log Out /  更改 )

Google+ photo

You are commenting using your Google+ account. Log Out /  更改 )

Twitter picture

You are commenting using your Twitter account. Log Out /  更改 )

Facebook photo

You are commenting using your Facebook account. Log Out /  更改 )

w

Connecting to %s