0
我正在從Linux機器上工作 - 當我輸入require'inotify'時,從irb中獲得以下錯誤。ruby loaderror inotify
欣賞任何幫助/指針。
irb(main):001:0> require 'inotify' LoadError: no such file to load -- inotify from :29:in
require' from <internal:lib/rubygems/custom_require>:29:in
require' from (irb):1 from /usr/bin/irb:12:in `'
irb(main):002:0> Gem.path
=> ["/home/johnq/.gem/ruby/1.9.1", "/usr/lib/ruby/gems/1.9.1"]
irb(main):003:0>
johnq$ gem list
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.1.1, 3.0.9)
actionpack (3.1.1, 3.0.9)
activemodel (3.1.1, 3.0.9)
activerecord (3.1.1, 3.0.9)
activeresource (3.1.1, 3.0.9)
activesupport (3.1.1, 3.0.9)
arel (2.2.1, 2.0.10)
builder (3.0.0, 2.1.2)
bundler (1.0.21, 1.0.15)
cgi_multipart_eof_fix (2.5.0)
daemons (1.1.4)
erubis (2.7.0, 2.6.6)
fastthread (1.0.7)
ffi (1.0.10)
gem_plugin (0.2.3)
hike (1.2.1)
i18n (0.6.0, 0.5.0)
json (1.6.1)
mail (2.3.0, 2.2.19)
mime-types (1.17.2, 1.16)
minitest (2.7.0, 1.6.0)
multi_json (1.0.3)
mysql (2.8.1)
polyglot (0.3.2, 0.3.1)
rack (1.3.5, 1.2.3)
rack-cache (1.1)
rack-mount (0.8.3, 0.6.14)
rack-ssl (1.3.2)
rack-test (0.6.1, 0.5.7)
rails (3.1.1, 3.0.9)
railties (3.1.1, 3.0.9)
rake (0.9.2.2, 0.8.7)
rb-inotify (0.8.8)
rdoc (3.11, 3.6.1, 2.5.8)
sprockets (2.0.3)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10, 1.4.9)
tzinfo (0.3.30, 0.3.28)
johnq$ irb
irb(main):001:0> require 'rb-inotify'
=> true
johnq$ gem remove rb-inotify
ERROR: While executing gem ... (RuntimeError)
Unknown command remove
johnq$ man gem
No manual entry for gem
johnq$ sudo gem uninstall rb-inotify
Password:
Successfully uninstalled rb-inotify-0.8.8
johnq$ irb
irb(main):001:0> require 'inotify'
LoadError: no such file to load -- inotify
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from (irb):1
from /usr/bin/irb:12:in `<main>'
irb(main):002:0>
johnq$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.9.1
- /home/johnq/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
我不明白這個問題。當你有寶石時,'require'rb-inotify''在你的會話中工作。然後,卸載gem *和*使用錯誤的'require'語句。當然,這是行不通的。我錯過了什麼? –
我正在使用require'inotify'的遺留程序。我試過寶石安裝inotify,但我找不到任何這樣的寶石。我發現rb-inotify,但其語法不同,程序給出了錯誤。我是新來的紅寶石,並沒有寶石專家。你能指點我提供inotify gem(而不是rb-inotify)的網站或版本嗎?謝謝。 –