Cannot require RedCloth with irb

407 Views Asked by At

I am using Ruby22-x64 just to let you know, but I successfully installed RedCloth-4.2.9 using gem install RedCloth within the command prompt. When I try to require 'rubygems' I get =>false which is normal because it's already loaded, but when I try require 'RedCloth this is the following error code I get:

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>

I don't know if it is the versions of RedCloth that may be doing this? Or some sort of path error? I really am looking for some help here though! Please!

1

There are 1 best solutions below

0
On

I had to change the path by creating a 2.2 folder to include redcloth_scan.so and I got it to work!

Thanks for the link @Casper