2014-04-07 13 views
9

मैं अपने रेल app में कुछ त्रुटियों मिल गया है और मैं निम्न आदेश जारी करके रेल सांत्वना शुरू करने के लिए कोशिश कर रहा हूँ:रेल कंसोल: में `की आवश्यकता होती है ': इस तरह के फ़ाइल लोड नहीं कर सकते हैं - ReadLine (LoadError)

rails console 

कोई फर्क नहीं पड़ता कि मैं क्या करने की कोशिश, मैं हमेशा एक ही त्रुटि हो रही है:

/usr/local/rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/irb/completion.rb:9:in `require': cannot load such file -- readline (LoadError) 
    from /usr/local/rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/irb/completion.rb:9:in `<top (required)>' 
    from /opt/mammie/web/icosole/vendor/bundle/ruby/2.1.0/gems/railties-3.1.3/lib/rails/commands/console.rb:3:in `require' 
    from /opt/mammie/web/icosole/vendor/bundle/ruby/2.1.0/gems/railties-3.1.3/lib/rails/commands/console.rb:3:in `<top (required)>' 
    from /opt/mammie/web/icosole/vendor/bundle/ruby/2.1.0/gems/railties-3.1.3/lib/rails/commands.rb:37:in `require' 
    from /opt/mammie/web/icosole/vendor/bundle/ruby/2.1.0/gems/railties-3.1.3/lib/rails/commands.rb:37:in `<top (required)>' 
    from script/rails:6:in `require' 
    from script/rails:6:in `<main>' 

मैं वास्तव में हर संभव समाधान मैं नेट पर पाया की कोशिश की है, के रूप में कई लोगों को एक ही त्रुटि का सामना करना। दुर्भाग्य से, कुछ भी काम नहीं लगता है।

ruby /usr/local/rvm/src/ruby-2.1.1/ext/readline/extconf.rb 

मैं उत्पादन

checking for tgetnum() in -lncurses... yes 
checking for readline/readline.h... yes 
checking for readline/history.h... yes 
checking for readline() in -lreadline... no 
checking for readline() in -ledit... no 
checking for editline/readline.h... no 
*** /usr/local/rvm/src/ruby-2.1.1/ext/readline/extconf.rb failed *** 

का संकेत है कि कुछ याद आ रही है निम्नलिखित मिलता है, लेकिन apt-get साथ ReadLine स्थापित करने या तो कोई फर्क नहीं पड़ता: जब मैं निम्न आदेश का प्रयास करें। मुझे लगता है कि यह असंगत मणि संस्करणों के साथ कुछ करने के लिए हो सकता है, क्योंकि कंसोल कुछ समय पहले संक्षेप में काम करता था। क्या रीडलाइन के साथ कोई ज्ञात संस्करण समस्या है? ऐसा लगता है कि इस मणि के साथ बहुत अधिक लोगों को समस्याएं आ रही हैं।

+0

मैं वास्तव में उपयोगी निम्नलिखित पृष्ठ पाया: https: // GitHub।कॉम/गार्ड/गार्ड/विकी/एड-रीडलाइन-सपोर्ट-टू-रूबी-ऑन-मैक-ओएस-एक्स # का उपयोग-आरवीएम-एंड-होमब्रू मुझे रीडलाइन और आईआरबी के साथ-साथ रेल कंसोल के साथ समस्याएं थीं। मेरे लिए, मैंने होमब्री अनुभाग का पालन किया। – Brian

उत्तर

1

मैं एक समय पहले इस समस्या थी, हल की जाँच: rvm requirements और क्या वापस आया स्थापित करने। माना जाता है, हालांकि यह आरवीएम का पुराना संस्करण था, इसलिए अब प्रासंगिक नहीं हो सकता है

4

मुझे अंत में एक समाधान मिला। यह कई मुद्दों (मणि संस्करण, विरोधाभासी रीडलाइन पुस्तकालयों) का संयोजन था।

सबसे पहले, मैं

sudo apt-get install libreadline-dev 

lib ReadLine refetched तब मैं गहरे लाल रंग का

rvm remove 2.1.1 

की स्थापना रद्द मैं गहरे लाल रंग का फिर से

rvm install 2.1.1 

मैं डिफ़ॉल्ट (2.1 उपयोग करने के लिए RVM बताया स्थापित। 1) रूबी

rvm use default 

मैं रेल पुनर्स्थापित और ReadLine

gem install rails 
gem install readline 

मैं एक त्रुटि मिल गया फिर से सांत्वना की शुरूआत है, लेकिन एक अलग से एक:

/usr/local/rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/irb/completion.rb:9:in `require': /usr/local/lib/libreadline.so.6: undefined symbol: UP - /usr/local/rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/x86_64-linux/readline.so (LoadError) 
    from /usr/local/rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/irb/completion.rb:9:in `<top (required)>' 
    from /opt/mammie/web/icosole/vendor/bundle/ruby/2.1.0/gems/railties-3.1.3/lib/rails/commands/console.rb:3:in `require' 
    from /opt/mammie/web/icosole/vendor/bundle/ruby/2.1.0/gems/railties-3.1.3/lib/rails/commands/console.rb:3:in `<top (required)>' 
    from /opt/mammie/web/icosole/vendor/bundle/ruby/2.1.0/gems/railties-3.1.3/lib/rails/commands.rb:37:in `require' 
    from /opt/mammie/web/icosole/vendor/bundle/ruby/2.1.0/gems/railties-3.1.3/lib/rails/commands.rb:37:in `<top (required)>' 
    from script/rails:6:in `require' 
    from script/rails:6:in `<main>' 

तो यह निर्देश (http://vkarthickeyan.wordpress.com/2012/02/16/mysql-symbol-lookup-error-usrlocalliblibreadline-so-6-undefined-symbol-up/) के बाद, मैं यह करने के लिए मिल गया है कार्य:

cd /usr/local/lib 
mkdir temp 
mv libreadline* temp 
ldconfig 
apt-get update 

सहायता के लिए शिकारीबोर्नर के लिए धन्यवाद!

+2

'मणि इंस्टॉल रीडलाइन 'होना चाहिए' मणि आरबी-रीडलाइन स्थापित करें ' – aqingsao

1

यह एक सोलारिस मशीन है कि कोई ReadLine था पर ठीक काम किया है, तो आप के लिए काम कर सकते हैं:

$ bundle exec irb 
irb(main):001:0> require File.expand_path('config/boot') 
=> true 
irb(main):002:0> require File.expand_path('config/environment') 
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01. 
Gem.source_index called from /export/home/deploy/recon/shared/bundle/ruby/1.8/gems/rails-2.3.18/lib/rails/gem_dependency.rb:21. 
Warning: NLS_LANG is not set. fallback to US7ASCII. 
=> true 
irb(main):027:0> require 'console_app' 
=> true 
संबंधित मुद्दे

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