在rails 2.3.9开发的应用中,有一台客户机浏览器总是出现ActionController::InvalidAuthenticityToken的错误。
google 了一下,发现这是 2.3.9的bug
There's a bug in the 2.3.9. It prevents to set the session ID when using an activerecord or memcache session store. See this rails ticket. You can fix it by using the Mislav's patch at http://gist.github.com/570149. You'll have to create and paste the code in config/initializers/sessions_patch.rb. Or you can run the following command in your project root path:
wget http://gist.github.com/570149.txt -O config/initializers/sessions_patch.rb
Finally don't forget to restart your server (and a maybe issue a rake db:sessions:clear).
解决办法,在项目根目录执行 wget http://gist.github.com/570149.txt -O config/initializers/sessions_patch.rb
具体见
http://stackoverflow.com/questions/3705496/actioncontrollerinvalidauthenticitytoken-in-sessionscontrollercreate-error
分享到:
相关推荐
Ruby.on.Rails.Tutorial,Learn.Web.Development.with.Rails,Third.Edition-中文版 文字版.pdf 个人收集电子书,仅用学习使用,不可用于商业用途,如有版权问题,请联系删除!
使用Rails构建可伸缩和可维护API的最佳方法
使用 Rails 4 的简单聊天应用程序 - ActionController::Live 应用组件: 1 . 使用 Rails 4 ActionController::Live 的聊天应用程序 2 . 基本 LDAP 身份验证 3 . Redis 服务器集成 4 . 彪马服务器 1 . Rails 4 ...
本书教您如何使用Ruby on Rails开发和部署真正的,具有工业实力的Web应用程序,Ruby on Rails是为诸如Twitter,Hulu,GitHub和Yellow Pages等顶级网站提供支持的开源Web框架。
Ruby on Rails印度尼西亚主页 该存储库是网站上内容的结果:地位一般说明不要忘记捆绑Gemfile资源: $ bundle install要构建源代码: $ jekyll build要查看源代码服务,请执行以下操作: $ jekyll serve您可以在耙上...
Uri :: Js :: Rails Rails的 安装 将此行添加到您的应用程序的Gemfile中: gem 'uri-js-rails', :group => :assets 然后执行: $ bundle 或将其自己安装为: $ gem install uri-js-rails 用法 添加到您的...
Clear EPUB version in English, Second Edition “The author is clearly an expert at the Ruby language and the Rails framework, but more than that, he is a working software engineer who introduces best...
[Pragmatic Bookshelf] Crafting Rails Applications Expert Practices for Everyday Rails Development (E-Book) ☆ 图书概要:☆ Rails 3 is a huge step forward. You can now easily extend the framework, ...
gem "mongoid_rails_migrations" 如何使用 创建迁移 $ rails generate mongoid:migration 运行迁移: $ rails db:migrate $ rails db:migrate:down VERSION= $ rails db:migrate:up VERSION= $ rails db:rollback...
: : [ping]: : [axios]: : [redaxios]: [Inertia.js]: : [高级配置]: : [ jQuery]: : [客户端库]:#client-libraries- [codegen]:#code-generation- [用法]:#use-the-path-helpers-in-您的js应用程序...
Rails资产管道集成 WOW版本1.1.2 安装 将此行添加到您的应用程序的Gemfile中: gem 'wow-rails' 然后执行: $ bundle 或将其自己安装为: $ gem install wow-rails 用法 在app / assets / javascripts / ...
Jquery::Colorpicker::Rails 用于Gem,用于在 Rails 应用程序中使用 安装 将此行添加到应用程序的 Gemfile 中: gem 'jquery-colorpicker-rails' 然后执行: $ bundle 或者自己安装: $ gem install jquery-...
smartcrop-rails smartcrop-rails gem是用于Rails 4应用程序的smartcrop.js javascript库的集成。 Smartcrop.js实现了一种算法,可以为图像找到合适的农作物。 演示:用于内容感知图像裁剪 来源: : 安装将此行添加...
Ruby on Rails教程样本应用程序这是的示例应用程序 进行 。执照中的所有源代码都可以根据MIT许可和Beerware许可共同获得。 有关详细信息,请参见 。入门要开始使用该应用程序,请克隆存储库,然后安装所需的gem: $ ...
基金会Rails助手 使用出色的Gem for Rails 4.1+应用程序。 包括: 一个定制的FormBuilder,它使用Foundation框架类生成表单。 它替换了当前的form_for ,因此无需更改您的Rails代码。 错误消息正确显示。 一个...
d3-rails为Rails 3.1及更高版本提供D3。版本d3-rails带有D3.js版本6.6.2。 d3-rails版本将始终镜像D3的版本。 如果您需要较新版本的d3-rails,请参阅“开发”部分(如下)。安装将此行添加到您的Gemfile : gem "d3...
ServiceWorker ::铁路 将您的Rails应用程序变成渐进式Web应用程序。 将与Rails或为什么? Rails资产管道对最佳部署JavaScript做出了许多假设,包括资产摘要指纹和寿命长的缓存头-主要是为了增加“缓存能力”。 Rails...
注意,该宝石适用于Rails,其中ApplicationController继承了ActiveController :: Base。 ActiveController :: API对Rails应用程序的支持即将推出。 用法 运行Rails服务器或运行rspec并检查log/action_tracer.log 。...
ButterCMS Rails SDK ButterCMS Rails SDK提供了一个生成器,可加快博客的设置。文献资料有关示例和API文档的完整列表,请查看我们的。安装首先,通过将gem添加到您的Gemfile中来安装它: gem 'buttercms-rails'安装...
imgix-rails是用于将集成到Ruby on Rails应用程序的宝石。 它建立在之上,提供了一些特定于Rails的接口。 ix_image_url 模型中的用法 链轮中的用法 与图像上传库一起使用 回形针和CarrierWave 重新提交 主动储存 ...