Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: [ANN] bluecloth 2.0.5

19 views
Skip to first unread message

Joel VanderWerf

unread,
Jul 15, 2009, 9:29:04 PM7/15/09
to
g...@FaerieMUD.org wrote:
> Version 2.0.5 of bluecloth has been released.

[Asked before for the 2.0.4 release, but maybe you didn't see it]

Any plans to support some of the extensions that maruku supports, like
tables and footnotes? Or does it already?

http://maruku.rubyforge.org/maruku.html#extra

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

Michael Granger

unread,
Jul 16, 2009, 2:19:37 AM7/16/09
to
On Jul 15, 2009, at 6:29 PM, Joel VanderWerf wrote:

> Any plans to support some of the extensions that maruku supports,
> like tables and footnotes? Or does it already?


I plan to support any of the extensions that the author of Discount
(on which BlueCloth 2 is based) supports (http://www.pell.portland.or.us/~orc/Code/markdown/#Language+extensions
), which don't (currently) include those two, but do include a few
other "Markdown Extra" features.

I personally agree with the author of Markdown that anything more than
basic Markdown is diverging from the whole point of it: that you
shouldn't have to remember to do anything different than you'd do when
writing an email to generate HTML that looks okay and is valid. If I
want tables and element IDs and definition lists, I use Textile.

That said, if anyone is motivated enough to send me a patch that adds
any of the Markdown Extra stuff, provided it (a) isn't enabled
if :strict_mode is true, (b) includes tests, and (c) doesn't make
keeping up with Discount updates a pain in the ass, I'll apply it.

--
Michael Granger <g...@FaerieMUD.org>
Rubymage, Architect, Believer
The FaerieMUD Consortium <http://www.FaerieMUD.org/>


Lui Core

unread,
Jul 16, 2009, 2:32:01 AM7/16/09
to
There is a non-standard function bzero() in generate.c, line 671
it stops VC from compiling bluecloth.
why not replace bzero() with standard memset()?
--
Posted via http://www.ruby-forum.com/.

Michael Granger

unread,
Jul 16, 2009, 2:39:45 AM7/16/09
to
On Jul 15, 2009, at 11:32 PM, Lui Core wrote:

> There is a non-standard function bzero() in generate.c, line 671
> it stops VC from compiling bluecloth.
> why not replace bzero() with standard memset()?


Good question; generate.c is code from Discount, so I'm loathe to
change it directly, but I'll add a test for bzero() to the extconf,
and substitute the equivalent memset() if it's not defined. That fix
will be in the next release. I don't (currently) have a Windows
license to test with, so would you mind testing it out before I release?

Lui Core

unread,
Jul 16, 2009, 3:09:09 AM7/16/09
to
Michael Granger wrote:
> On Jul 15, 2009, at 11:32 PM, Lui Core wrote:
>
>> There is a non-standard function bzero() in generate.c, line 671
>> it stops VC from compiling bluecloth.
>> why not replace bzero() with standard memset()?
>
>
> Good question; generate.c is code from Discount, so I'm loathe to
> change it directly, but I'll add a test for bzero() to the extconf,
> and substitute the equivalent memset() if it's not defined. That fix
> will be in the next release. I don't (currently) have a Windows
> license to test with, so would you mind testing it out before I release?

I'd be glad to :)

Li Cheng

unread,
Jul 31, 2009, 3:58:19 AM7/31/09
to
Hi,

I am trying to install bluecloth on Windows XP, but got the following
errors when I issue the "gem install bluecloth" command:

C:\jerry>gem install bluecloth
Building native extensions. This could take a while...
ERROR: Error installing bluecloth:
ERROR: Failed to build gem native extension.

c:/ruby/bin/ruby.exe extconf.rb
checking for srand()... no
checking for srandom()... no
checking for random()... no
checking for rand()... no
checking for strcasecmp()... no
checking for stricmp()... no
This extension requires either strcasecmp() or stricmp()
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Lui Core

unread,
Jul 31, 2009, 6:03:39 AM7/31/09
to
IF YOU ARE USING VC2005 or VC2008, there maybe a problem of strcasecmp()
and stricmp().
stricmp() is deprecated since VC 2005 (use _stricmp() instead), but
ruby's header win32.h doesn't know it.

a quick hack fix:
in include/ruby-1.x.x/ruby/win32.h, change definitions of strcasecmp and
strncasecmp as follows:

#define strcasecmp _stricmp
#define strncasecmp _strnicmp

For other compilers, maybe there is a similar issue ? i don't know ...

Lui Core

unread,
Jul 31, 2009, 6:12:21 AM7/31/09
to
.. you need a C compiler to build native extensions ...

Li Cheng wrote:
> Hi,
>
> I am trying to install bluecloth on Windows XP, but got the following
> errors when I issue the "gem install bluecloth" command:
>
> C:\jerry>gem install bluecloth
> Building native extensions. This could take a while...
> ERROR: Error installing bluecloth:

> ......

Li Cheng

unread,
Jul 31, 2009, 7:23:01 AM7/31/09
to
Is there another way to get bluecloth on to Windows without gem or C
compiler?

Thank you.

Luis Lavena

unread,
Jul 31, 2009, 7:35:24 AM7/31/09
to
On Jul 31, 8:23 am, Li Cheng <qweru...@gmail.com> wrote:
> Is there another way to get bluecloth on to Windows without gem or C
> compiler?
>
> Thank you.

Please ask the gem author to use rake-compiler to generate native
Windows gems during the release process:

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

There are several examples of other gem authors using rake-compiler to
release gems:

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

Using that tool they will be able to generate binaries for Windows
without you needed to fight and resolve the obsolete VC6/Compiling
extensions war.

--
Luis Lavena

Michael Granger

unread,
Aug 7, 2009, 8:37:57 AM8/7/09
to
On Jul 31, 2009, at 4:23 AM, Li Cheng wrote:

> Is there another way to get bluecloth on to Windows without gem or C
> compiler?


Sorry, I do actually have build targets for binary Windows-compatible
gems, but I've been neglecting to build them. I've built one for the
2.0.5 release and put it on RubyForge, and I'll be hooking the win32
build into my release tasks so they'll be distributed for future
releases, too.

You can also fetch the binary gem from:

http://deveiate.org/code/bluecloth-2.0.5-x86-mingw32.gem

Luis Lavena

unread,
Aug 7, 2009, 6:59:45 PM8/7/09
to
On Aug 7, 9:37 am, Michael Granger <g...@faeriemud.org> wrote:
> On Jul 31, 2009, at 4:23 AM, Li Cheng wrote:
>
> > Is there another way to get bluecloth on to Windows without gem or C
> > compiler?
>
> Sorry, I do actually have build targets for binary Windows-compatible  
> gems, but I've been neglecting to build them. I've built one for the  
> 2.0.5 release and put it on RubyForge, and I'll be hooking the win32  
> build into my release tasks so they'll be distributed for future  
> releases, too.
>
> You can also fetch the binary gem from:
>
>    http://deveiate.org/code/bluecloth-2.0.5-x86-mingw32.gem

Michael.

If you switch to rake-compiler you can deliver Windows native gems
from the convenience of Linux or OSX.

--
Luis Lavena

Michael Granger

unread,
Aug 7, 2009, 8:04:40 PM8/7/09
to
On Aug 7, 2009, at 4:00 PM, Luis Lavena wrote:

> On Aug 7, 9:37 am, Michael Granger <g...@faeriemud.org> wrote:
>> You can also fetch the binary gem from:
>>
>> http://deveiate.org/code/bluecloth-2.0.5-x86-mingw32.gem
>

> If you switch to rake-compiler you can deliver Windows native gems
> from the convenience of Linux or OSX.


But I'm already delivering them from the convenience of OSX! :)

I tested it using a friend's Windows box, but the gem above was built
on my Mac Pro. I wrote Rake tasks to build a cross-compiling Ruby, and
then cross-compile gems before I'd even heard of rake-compiler. I
think rake-compiler is an awesome bit of software, don't get me wrong,
but I'm loathe to convert 20+ projects to use it now when I already
have something that works pretty well.

Luis Lavena

unread,
Aug 8, 2009, 7:31:13 PM8/8/09
to
On Aug 7, 9:04 pm, Michael Granger <g...@FaerieMUD.org> wrote:
> On Aug 7, 2009, at 4:00 PM, Luis Lavena wrote:
>
> > On Aug 7, 9:37 am, Michael Granger <g...@faeriemud.org> wrote:
> >> You can also fetch the binary gem from:
>
> >>    http://deveiate.org/code/bluecloth-2.0.5-x86-mingw32.gem
>
> > If you switch to rake-compiler you can deliver Windows native gems
> > from the convenience of Linux or OSX.
>
> But I'm already delivering them from the convenience of OSX! :)

Glad to hear that!

> I tested it using a friend's Windows box, but the gem above was built  
> on my Mac Pro. I wrote Rake tasks to build a cross-compiling Ruby, and  
> then cross-compile gems before I'd even heard of rake-compiler. I  
> think rake-compiler is an awesome bit of software, don't get me wrong,  
> but I'm loathe to convert 20+ projects to use it now when I already  
> have something that works pretty well.
>

Then perhaps I was looking at the wrong code, since couldn't find over
the repository:

http://www.deveiate.org/projects/BlueCloth/browser

Any indication of cross compilation tasks.

I'm not wanting to force you use another tool or transform your
projects, just wanted to ease the burden on helping others.

Cheers,
--
Luis Lavena

Michael Granger

unread,
Aug 10, 2009, 7:12:47 PM8/10/09
to
On Aug 8, 2009, at 4:35 PM, Luis Lavena wrote:

>> I wrote Rake tasks to build a cross-compiling Ruby, and
>> then cross-compile gems before I'd even heard of rake-compiler. I
>> think rake-compiler is an awesome bit of software, don't get me
>> wrong,
>> but I'm loathe to convert 20+ projects to use it now when I already
>> have something that works pretty well.
>>
>
> Then perhaps I was looking at the wrong code, since couldn't find over
> the repository:
>
> http://www.deveiate.org/projects/BlueCloth/browser
>
> Any indication of cross compilation tasks.


Check here:

http://repo.deveiate.org/rake-tasklibs/file/bc0c72d95663/win32.rb

I have a single directory of rake tasks for all my other projects that
gets checked out under the top-level directory.

I'd appreciate any suggestions you might have for me if you see
something glaringly wrong. I stitched the tasks together out of a
couple of blog posts on the subject I found, and I know very little
about Win32 or binary gems. They seem to work when I test them, but I
might be doing something horrible.

T.J. Crowder

unread,
Sep 7, 2009, 8:50:40 AM9/7/09
to
On Aug 7, 1:37 pm, Michael Granger <g...@faeriemud.org> wrote:
> On Jul 31, 2009, at 4:23 AM, Li Cheng wrote:
>
> > Is there another way to getblueclothon to Windows without gem or C

> > compiler?
>
> Sorry, I do actually have build targets for binary Windows-compatible  
> gems, but I've been neglecting to build them. I've built one for the  
> 2.0.5 release and put it on RubyForge, and I'll be hooking the win32  
> build into my release tasks so they'll be distributed for future  
> releases, too.
>
> You can also fetch the binary gem from:
>
>    http://deveiate.org/code/bluecloth-2.0.5-x86-mingw32.gem
>
> --
> Michael Granger <g...@FaerieMUD.org>
> Rubymage, Architect, Believer
> The FaerieMUD Consortium <http://www.FaerieMUD.org/>

Hi Michael,

I'm trying to use the bluecloth-2.0.5-x86-mingw32.gem gem on Windows
XP, and the install went beautifully, but I get errors on use. Using
this test:
* * * *
require 'bluecloth'
BlueCloth.new('*testing*').to_html
* * * *

I get the following:
* * * *
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require': no such file
to load -- bluecloth_ext (LoadError)
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
from C:/Ruby/lib/ruby/gems/1.8/gems/bluecloth-2.0.5-x86-
mingw32/lib/bluecloth.rb:156
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
36:in `gem_original_require'
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
36:in `require'
from C:/Ruby/temp.rb:1
* * * *

Am I missing a dependency somewhere? Apologies if this is an obvious
issue, I'm not a Ruby person, I'm just trying to help the Prototype
project with its documentation, and naturally they're trying to use
BlueCloth2 for markdown stuff.

Thanks in advance,
--
T.J. Crowder
tj / crowder software / com

Luis Lavena

unread,
Sep 7, 2009, 2:07:36 PM9/7/09
to

*ANY* library installed with RubyGems must require rubygems.

require 'rubygems'


require 'bluecloth'
BlueCloth.new('*testing*').to_html

Unless, of course, you're requiring it inside Rails, which already
requires rubygems and you should be indicating the gem dependency
inside environment.rb

HTH,
--
Luis Lavena

T.J. Crowder

unread,
Sep 10, 2009, 5:04:48 AM9/10/09
to

Hi Luis,

Thanks for that. Unfortunately, that doesn't seem to be it, adding
the rubygems require didn't change anything. I'm not a Ruby person,
but I guess that means they must be enabled by default in (as you say)
the configuration; this is just a fairly basic One-Click Ruby Install.

Thanks anyway, though,


--
T.J. Crowder
tj / crowder software / com

www.crowdersoftware.com

Luis Lavena

unread,
Sep 10, 2009, 6:26:05 AM9/10/09
to

Seems you using the old One-Click Installer.

Please follow some guides from our homepage:

http://rubyinstaller.org/

I can tell you lot of these gems works on the new version of Ruby
Installer :-)

--
Luis Lavena

Harry Seldon

unread,
Dec 24, 2009, 3:57:14 PM12/24/09
to
Hi,

I am using rubyinstaller-1.8.6-p383-rc1.exe .

When I install bluecloth (gem install bluecloth), I get:


Building native extensions. This could take a while...
ERROR: Error installing bluecloth:

ERROR: Failed to build gem native extension.

C:/Ruby1.8.6/bin/ruby.exe extconf.rb


checking for srand()... no
checking for srandom()... no
checking for random()... no
checking for rand()... no
checking for strcasecmp()... no
checking for stricmp()... no
This extension requires either strcasecmp() or stricmp()
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Using the binary gem from
http://deveiate.org/code/bluecloth-2.0.5-x86-mingw32.gem
leads to the same problem as the one described in
http://www.deveiate.org/projects/BlueCloth/ticket/59 .
In the binary gem the file bluecloth_ext.so is missing. Does someone
have it?

Basically the advice given by Lui Kore looks really relevant. Indeed in
C:\Ruby1.8.6\lib\ruby\1.8\i386-mingw32\win32\win32.h the lines
#define strcasecmp(s1, s2) stricmp(s1, s2)
#define strncasecmp(s1, s2, n) strnicmp(s1, s2, n)
seem at fault.
I'd like to change them to
#define strcasecmp(s1, s2) _stricmp(s1, s2)
#define strncasecmp(s1, s2, n) _strnicmp(s1, s2, n)

But then, how can these lines be taken into account. How can they be
compiled?

Thx
Happy Holidays
H

Luis Lavena

unread,
Dec 24, 2009, 4:35:34 PM12/24/09
to
On Dec 24, 5:57 pm, Harry Seldon <harry.seldo...@gmail.com> wrote:
> Hi,
>
> I am using rubyinstaller-1.8.6-p383-rc1.exe .
>
> When I install bluecloth (gem install bluecloth), I get:
> Building native extensions.  This could take a while...
> ERROR:  Error installing bluecloth:
>         ERROR: Failed to build gem native extension.
>
> C:/Ruby1.8.6/bin/ruby.exe extconf.rb
> checking for srand()... no
> checking for srandom()... no
> checking for random()... no
> checking for rand()... no
> checking for strcasecmp()... no
> checking for stricmp()... no
> This extension requires either strcasecmp() or stricmp()
> *** extconf.rb failed ***
> Could not create Makefile due to some reason, probably lack of
> necessary libraries and/or headers.  Check the mkmf.log file for more
> details.  You may need configuration options.
>
> Using the binary gem from http://deveiate.org/code/bluecloth-2.0.5-x86-mingw32.gem
> leads to the same problem as the one described inhttp://www.deveiate.org/projects/BlueCloth/ticket/59.
> In the binary gem the file bluecloth_ext.so is missing. Does someone
> have it?
>

The gem is broken, I've responded to this before over RubyInstaller
group:

http://groups.google.com/group/rubyinstaller/browse_thread/thread/59f3812381a195b5

That includes instruction and patch for the future.

--
Luis Lavena

Harry Seldon

unread,
Dec 25, 2009, 12:50:05 PM12/25/09
to
Thx Luis!

To sum up:
Install the devkit available at http://rubyinstaller.org/
then gem install bluecloth --platform=ruby

0 new messages