2010-11-08 18 views
11

जब मैं 'रेल सर्वर' चलाने की कोशिश करता हूं तो यह मुझे एक त्रुटि दे रहा है कि यह 'jcode' नहीं ढूंढ सकता है, और मुझे लगता है कि जेकोड एक डिफ़ॉल्ट रूबी lib है। क्या आपके पास लोगों के बारे में कोई संकेत है कि क्या हो रहा है?रेल सर्वर चलाते समय कोई 'jcode' मणि

/Users/seanfchan/.rvm/gems/[email protected]/gems/gdata-1.1.1/lib/gdata.rb:21:in `require': no such file to load -- jcode (LoadError) 
from /Users/seanfchan/.rvm/gems/[email protected]global/gems/gdata-1.1.1/lib/gdata.rb:21:in `<top (required)>' 
from /Users/seanfchan/.rvm/gems/[email protected]/gems/contacts-1.2.4/lib/contacts/gmail.rb:1:in `require' 
from /Users/seanfchan/.rvm/gems/[email protected]/gems/contacts-1.2.4/lib/contacts/gmail.rb:1:in `<top (required)>' 
from /Users/seanfchan/.rvm/gems/[email protected]/gems/contacts-1.2.4/lib/contacts.rb:6:in `require' 
from /Users/seanfchan/.rvm/gems/[email protected]/gems/contacts-1.2.4/lib/contacts.rb:6:in `<top (required)>' 
from /Users/seanfchan/.rvm/gems/[email protected]/gems/bundler-1.0.3/lib/bundler/runtime.rb:64:in `require' 
from /Users/seanfchan/.rvm/gems/[email protected]/gems/bundler-1.0.3/lib/bundler/runtime.rb:64:in `block (2 levels) in require' 
from /Users/seanfchan/.rvm/gems/[email protected]/gems/bundler-1.0.3/lib/bundler/runtime.rb:62:in `each' 
from /Users/seanfchan/.rvm/gems/[email protected]/gems/bundler-1.0.3/lib/bundler/runtime.rb:62:in `block in require' 
from /Users/seanfchan/.rvm/gems/[email protected]/gems/bundler-1.0.3/lib/bundler/runtime.rb:51:in `each' 
from /Users/seanfchan/.rvm/gems/[email protected]/gems/bundler-1.0.3/lib/bundler/runtime.rb:51:in `require' 
from /Users/seanfchan/.rvm/gems/[email protected]/gems/bundler-1.0.3/lib/bundler.rb:112:in `require' 
from /Users/seanfchan/RubyPractice/gettingContancts/config/application.rb:7:in `<top (required)>' 
from /Users/seanfchan/.rvm/gems/[email protected]/gems/railties-3.0.1/lib/rails/commands.rb:28:in `require' 
from /Users/seanfchan/.rvm/gems/[email protected]/gems/railties-3.0.1/lib/rails/commands.rb:28:in `block in <top (required)>' 
from /Users/seanfchan/.rvm/gems/[email protected]/gems/railties-3.0.1/lib/rails/commands.rb:27:in `tap' 
from /Users/seanfchan/.rvm/gems/[email protected]/gems/railties-3.0.1/lib/rails/commands.rb:27:in `<top (required)>' 
from script/rails:6:in `require' 
from script/rails:6:in `<main>' 

सिस्टम: मैक OSX हिम तेंदुए
रूबी: RVM 1.9.2
रेल: 3.0.1
रत्न: 1.3.7
'संपर्क' मणि का उपयोग करने के

धन्यवाद की कोशिश कर रहा,
शॉन चैन

उत्तर

17

आपके द्वारा उपयोग की जाने वाली लाइब्रेरी की तरह लगता है रूबी 1.9 के लिए अपडेट नहीं किया गया था।

रूबी> = 1.9 में जापानी (ईयूसी/एसजेआईएस) तारों को संभालने के लिए एक मॉड्यूल नहीं है, क्योंकि यह मूल रूप से यूनिकोड का समर्थन करता है।

आप पुस्तकालय के एक नए संस्करण की देख सकते हैं, उपलब्ध है अन्यथा आप स्रोत को देखो और जहां यह jcode की आवश्यकता होती है पा सकते हैं, और

require 'jcode' if RUBY_VERSION < '1.9' 
+0

धन्यवाद मार्क कि चाल – Sarindipity

+0

मैं रूबी के लिए नया हूँ, और एक ही त्रुटि मिली। क्या आप कृपया मुझे सही कोड बता सकते हैं कि यह कोड कहां रखा जाए ?? – Bongs

+0

@ बोंग्स: त्रुटि संदेश आपको बिल्कुल फाइल और रेखा बताता है। –

5

हम lib की जाँच करनी चाहिए साथ बदलें फ़ोल्डर जो gdata मणि फ़ाइल के तहत प्रस्तुत किया गया है। lib/gdata.rb फ़ाइल में

require 'jcode' if RUBY_VERSION < '1.9' 

:

इस लाइन में जोड़ें।

2

अन्य समाधान है, अपने gemfile में रखते:

gem 'gdata_19', '1.1.5' 
gem 'contacts', :git => '[email protected]:eofferma/contacts.git' 
+0

मुझे बस स्विच करना पड़ा: मणि 'gdata_19', '1.1.5' – whizcreed

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