2011-03-23 69 views
0

我有一個rails 2.3.4應用程序,我想用omniauth(0.1.5)擴展。當我使用RVM和地點安裝omniauth寶石需要在config.rb文件我得到以下錯誤「omniauth」:安裝omniauth rails 2.3.4

`gem_original_require':沒有這樣的文件來加載 - omniauth(MissingSourceFile)

的教程建議使用把它放在gemfile中,但我使用rails 2.

當我'寶石列表'omniauth可用但是。

這花了一些時間(拉毛),我不知道如何繼續。

我把需求放在正確的地方,還是有其他地方我可以把它(除了形式明顯:-))?

任何想法將是巨大的....

編輯1:我試過config.gem 「omniauth」 在您的environments.rb文件,並得到了 /家庭/ mcaulejj /探險/配置/環境。 RB:10:未定義的局部變量或方法'配置」主:對象(NameError)

編輯2:使用RVM我更新了所有的寶石,但我仍然得到同樣的錯誤.....

我在這一點上很惱火。

乾杯Slothihtype

回答

1

environments.rb文件嘗試config.gem "omniauth"

編輯

按照評論,

嘗試:

require File.join(File.dirname(__FILE__), 'boot') 
#insert the following here, in your config/environment.rb 
if Gem::VERSION >= "1.3.6" 
    module Rails 
     class GemDependency 
      def requirement 
       r = super 
       (r == Gem::Requirement.default) ? nil : r 
      end 
     end 
    end 
end 
+0

添加require 'oa-oauth' @ fareesh-vijayarangam歡呼。是否現在得到....'要求':未定義的局部變量或方法'version_requirements'爲#(NameError) – slotishtype 2011-03-23 16:31:59

0

在你的environment.rb文件中