有人遇到这个错误吗?
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:模块错误
发布评论