Ruby on Rails,LinkedIn:模块错误 [英] Ruby on Rails, LinkedIn:Module error

查看:85
本文介绍了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.com/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:模块错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆