2013-02-27 29 views
5

की संपत्ति 'वेबकिट' नहीं पढ़ सकता है, मैं रेल ट्यूटोरियल पर रूबी के अध्याय 8 में उदाहरणों के माध्यम से काम कर रहा हूं और मुझे अपने पृष्ठों पर उपरोक्त त्रुटि मिल रही है, और मेरा ड्रॉपडाउन मेनू काम नहीं कर रहा है। इस पर कोई विचार है कि मैं इसे कैसे ठीक कर सकता हूं?Uncaught TypeError: अपरिभाषित

/* =================================================== 
* bootstrap-transition.js v2.0.0 
* http://twitter.github.com/bootstrap/javascript.html#transitions 
* =================================================== 
* Copyright 2012 Twitter, Inc. 
* 
* Licensed under the Apache License, Version 2.0 (the "License"); 
* you may not use this file except in compliance with the License. 
* You may obtain a copy of the License at 
* 
* http://www.apache.org/licenses/LICENSE-2.0 
* 
* Unless required by applicable law or agreed to in writing, software 
* distributed under the License is distributed on an "AS IS" BASIS, 
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
* See the License for the specific language governing permissions and 
* limitations under the License. 
* ========================================================== */ 


!function($) { 

    $(function() { 

    "use strict" 

    /* CSS TRANSITION SUPPORT (https://gist.github.com/373874) 
    * ======================================================= */ 

    $.support.transition = (function() { 
     var thisBody = document.body || document.documentElement 
     , thisStyle = thisBody.style 
     , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined 

     return support && { 
     end: (function() { 
      var transitionEnd = "TransitionEnd" 
      if ($.browser.webkit) { 
Uncaught TypeError: Cannot read property 'webkit' of undefined 
      transitionEnd = "webkitTransitionEnd" 
      } else if ($.browser.mozilla) { 
      transitionEnd = "transitionend" 
      } else if ($.browser.opera) { 
      transitionEnd = "oTransitionEnd" 
      } 
      return transitionEnd 
     }()) 
     } 
    })() 

    }) 

}(window.jQuery); 

उत्तर

10

लाइन के साथ अपने Gemfile अपडेट करके नवीनतम संस्करण में अपने बूटस्ट्रैप-सास मणि अपग्रेड:

gem 'bootstrap-sass', '~> 2.3.0.1' 

मैं मुद्दों कर गया था और यह था, क्योंकि मैं इस बात का संस्करण 2.0.0 चल रहा था मणि। निश्चित नहीं है कि वे ट्यूटोरियल में किस संस्करण को चलाने की अनुशंसा करते हैं, लेकिन नवीनतम संस्करण में अपग्रेड करने से आपको चोट नहीं पहुंचीगी।

+0

मेरे लिए भी काम किया (सर्वर को पुनरारंभ करने के बाद) – nicolaspanel

13

मुझे लगता है कि समस्या यह है कि यह यहाँ है: $.browser.webkit - स्पष्ट रूप से $ .browser jQuery 1.9+ में हटा दिया गया है।

this thread के अनुसार कोई प्रत्यक्ष प्रतिस्थापन नहीं है, हालांकि this plugin का उपयोग करके आप उस टैग की कार्यक्षमता को पुनर्स्थापित करने में सक्षम होना चाहिए।

संबंधित मुद्दे