BlueCloth not working

231 views
Skip to first unread message

Charles Roper

unread,
Nov 12, 2009, 3:30:08 PM11/12/09
to RubyInstaller
Just discovered BlueCloth 2 isn't working. It's been reported, but in
the two months since, the author doesn't seem to have made any
progress:

http://deveiate.org/projects/BlueCloth/ticket/59

Has anyone got any ideas for a resolution?

C:\>ruby -v
ruby 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32]

C:\>irb -rubygems
irb(main):001:0> require 'bluecloth'
LoadError: no such file to load -- bluecloth_ext
from C:/Users/charlesr/Tools/Ruby/ruby-1.8.6-p383-i386-mingw32/
lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from C:/Users/charlesr/Tools/Ruby/ruby-1.8.6-p383-i386-mingw32/
lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from C:/Users/charlesr/Tools/Ruby/ruby-1.8.6-p383-i386-mingw32/
lib/ruby/gems/1.8/gems/bluecloth-2.0.5-x86-mingw32/lib/bluecloth.rb:
156
from C:/Users/charlesr/Tools/Ruby/ruby-1.8.6-p383-i386-mingw32/
lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require'
from C:/Users/charlesr/Tools/Ruby/ruby-1.8.6-p383-i386-mingw32/
lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from (irb):1

Cheers,
Charles

Luis Lavena

unread,
Nov 12, 2009, 4:00:27 PM11/12/09
to rubyin...@googlegroups.com
On Thu, Nov 12, 2009 at 5:30 PM, Charles Roper <charle...@gmail.com> wrote:
>
> Just discovered BlueCloth 2 isn't working. It's been reported, but in
> the two months since, the author doesn't seem to have made any
> progress:
>
> http://deveiate.org/projects/BlueCloth/ticket/59
>
> Has anyone got any ideas for a resolution?
>

Well, the gem is missing the extension binary...

Without the binary, no matter you hard you mark a gem as x86-mingw32,
is not going to work.

I would recommend to the gem author:

* Better organize the extension layout
* Use of rake-compiler to build the extension
* Add pure-ruby entry points for the library and adjust the loaded
extension using fat-binary approach.

All the above stuff can be found at rake-compiler readme:

http://github.com/luislavena/rake-compiler

And samples on how to do that in the wiki:

http://wiki.github.com/luislavena/rake-compiler/projects-using-rake-compiler

Simple cases with this approach are mysql-gem and sqlite3-ruby, but
they download 3rd party binaries to make that happen... which can be
ignored for this case.

If the repository was in GitHub, I could definitely perform the
reorganization and all the patches in a couple of hours, but Mercurial
is not my strongest DVCS

--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Charles Roper

unread,
Nov 13, 2009, 3:02:28 AM11/13/09
to rubyin...@googlegroups.com
On 12/11/2009 21:00, Luis Lavena wrote:
>
> On Thu, Nov 12, 2009 at 5:30 PM, Charles Roper<charle...@gmail.com> wrote:
>>
>> Just discovered BlueCloth 2 isn't working.

> Well, the gem is missing the extension binary...


>
> Without the binary, no matter you hard you mark a gem as x86-mingw32,
> is not going to work.

[snip]

> If the repository was in GitHub, I could definitely perform the
> reorganization and all the patches in a couple of hours, but Mercurial
> is not my strongest DVCS

In that case, what about RDiscount instead? Ryan Tomayko seems to be
actively maintaining it and it's on Github...

http://github.com/rtomayko/rdiscount/

Charles

Luis Lavena

unread,
Nov 13, 2009, 7:15:24 AM11/13/09
to rubyin...@googlegroups.com

AFAIK, RDiscount uses a non-portable posix functionality, is like a
memory mapped file handler (cookie something?)

Why you don't force the installation of the ruby gem and use the
development kit to make it compile it instead?

gem install --platform=ruby

Charles Roper

unread,
Nov 13, 2009, 11:09:40 AM11/13/09
to rubyin...@googlegroups.com
2009/11/13 Luis Lavena <luisl...@gmail.com>:

> Why you don't force the installation of the ruby gem and use the
> development kit to make it compile it instead?
>
> gem install --platform=ruby

Genius!

C:\>gem install bluecloth --platform=ruby
Building native extensions. This could take a while...
Successfully installed bluecloth-2.0.5
1 gem installed

C:\>irb -rubygems
irb(main):001:0> require 'bluecloth'

=> true

Luis, you truly are a Ruby Hero. :D

Charles

Reply all
Reply to author
Forward
0 new messages