【问题标题】:Cannot require RedCloth with irb不能要求带有 irb 的 RedCloth
【发布时间】:2015-08-13 10:03:53
【问题描述】:

我使用Ruby22-x64 只是为了让您知道,但我在命令提示符下使用gem install RedCloth 成功安装了RedCloth-4.2.9。当我尝试require 'rubygems' 时,我得到=>false,这是正常的,因为它已经加载,但是当我尝试require 'RedCloth 时,我得到以下错误代码:

irb(main):001:0> require 'RedCloth'
LoadError: cannot load such file -- 2.2/redcloth_scan

Couldn't load 2.2/redcloth_scan

The $LOAD_PATH was:
C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/RedCloth-    4.2.9
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/RedCloth-4.2.9/lib
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/RedCloth-    4.2.9/lib/case_sensitive_require

C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/RedCloth-4.2.9/ext
C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0
C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/x64-msvcrt
C:/Ruby22-x64/lib/ruby/site_ruby
C:/Ruby22-x64/lib/ruby/vendor_ruby/2.2.0
C:/Ruby22-x64/lib/ruby/vendor_ruby/2.2.0/x64-msvcrt
C:/Ruby22-x64/lib/ruby/vendor_ruby
C:/Ruby22-x64/lib/ruby/2.2.0
C:/Ruby22-x64/lib/ruby/2.2.0/x64-mingw32
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54
:in `require'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54
:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/RedCloth-   4.2.9/lib/RedCloth.
rb:13:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:12
8:in `require'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:12
8:in `rescue in require'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39
:in `require'
    from (irb):1
    from C:/Ruby22-x64/bin/irb:11:in `<main>'
irb(main):002:0>

我不知道是不是 RedCloth 的版本可能会这样做?还是某种路径错误?不过,我真的在这里寻求帮助!请!

【问题讨论】:

  • 确保您拥有最新的 Ruby 和最新的 RedCloth。 (我会检查版本,但我在手机上)
  • 我认为这可能对您有所帮助:stackoverflow.com/questions/7290868/…
  • @QPaysTaxes 我有两个最新版本,我想我要回去看看能不能让它工作。

标签: ruby rubygems require irb redcloth


【解决方案1】:

我必须通过创建一个 2.2 文件夹来更改路径以包含 redcloth_scan.so 并且我让它工作了!

感谢@Casper 的链接

【讨论】:

    猜你喜欢
    • 2011-08-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多