Ruby on Rails,LinkedIn:模块错误

编程入门 行业动态 更新时间:2024-10-28 21:25:37
本文介绍了Ruby on Rails,LinkedIn:模块错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有人遇到这个错误吗?

NoMethodError (undefined method `new' for LinkedIn:Module)

我认为这与omniauth和linkedin有关.这是我的Gemfile:

I think it's related to omniauth and linkedin. Here's my Gemfile:

gem 'omniauth' gem 'linkedin', :git => "git://github/redbeard-tech/linkedin.git", :branch => 'jsapi'

我正在使用:

  • 红宝石1.8.7(2010-01-10补丁程序级别249)
  • rails 3.0.5

可能是什么原因?

推荐答案

检查您正在使用的omniauth版本.我们最近遇到了这个问题,它来自我们的具有omniauth 0.3.x的开发环境,而新环境则获得了新的1.0版本.在 omniauth github网站上,它说:

Check what version of omniauth you are using. We recently ran into this and it was from our dev environment having omniauth 0.3.x and the new environment getting the new 1.0 release. On the omniauth github site it says:

OmniAuth 1.0从版本0.x开始有一些重大更改.如果您不想进行更困难的升级,则可以将依赖性设置为〜> 0.3.2.有关更多信息,请参见Wiki.

OmniAuth 1.0 has several breaking changes from version 0.x. You can set the dependency to ~> 0.3.2 if you do not wish to make the more difficult upgrade. See the wiki for more information.

我怀疑你被那个咬了.

更多推荐

Ruby on Rails,LinkedIn:模块错误

本文发布于:2023-10-27 06:40:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1532609.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模块   错误   Ruby   Rails   LinkedIn

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!