Bluecloth v2.0.10 not working

139 views
Skip to first unread message

Jaymin

unread,
Feb 8, 2011, 5:55:02 AM2/8/11
to RubyInstaller
WIth Ruby 187, I had downloaded devkit from http://rubyinstaller.org/downloads
and followed the instruction per https://github.com/oneclick/rubyinstaller/wiki/Development-Kit.
I had also ensured that devkit is installed properly by following
smoke test.

I had then tried installing bluecloth (v2.0.10). It had failed with
following error:

C:\test\typo>gem install bluecloth --platform=ruby

Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing bluecloth:
ERROR: Failed to build gem native extension.

c:/Ruby187/bin/ruby.exe extconf.rb
checking for srand()... yes
checking for random()... no
checking for rand()... yes
checking for bzero() in string.h,strings.h... no
checking for strcasecmp()... yes
checking for strncasecmp()... yes
checking for mkdio.h... yes
checking for ruby/encoding.h... no
creating extconf.h
creating Makefile

make
gcc -I. -I. -Ic:/Ruby187/lib/ruby/1.8/i386-mingw32 -I. -
DRUBY_EXTCONF_H=\"extcon
f.h\" -DVERSION=\"2.0.4\" -g -O2 -DFD_SETSIZE=256 -I. -Wall -c
bluecloth.c

In file included from c:\rubydevkit\mingw\bin\../lib/gcc/
mingw32/4.5.1/../../../../include/windows.h:48:0,
from c:\rubydevkit\mingw\bin\../lib/gcc/
mingw32/4.5.1/../../../../include/winsock2.h:22,
from c:/Ruby187/lib/ruby/1.8/i386-mingw32/win32/
win32.h:27,
from c:/Ruby187/lib/ruby/1.8/i386-mingw32/defines.h:
186,
from c:/Ruby187/lib/ruby/1.8/i386-mingw32/ruby.h:37,
from bluecloth.h:14,
from bluecloth.c:25:
c:\rubydevkit\mingw\bin\../lib/gcc/mingw32/4.5.1/../../../../include/
windef.h:229:23: error: duplicate 'unsigned'
c:\rubydevkit\mingw\bin\../lib/gcc/mingw32/4.5.1/../../../../include/
windef.h:238:23: error: duplicate 'unsigned'
c:\rubydevkit\mingw\bin\../lib/gcc/mingw32/4.5.1/../../../../include/
windef.h:238:23: error: two or more data types in declaration
specifiers
c:\rubydevkit\mingw\bin\../lib/gcc/mingw32/4.5.1/../../../../include/
windef.h:241:24: error: duplicate 'unsigned'
bluecloth.c: In function 'bluecloth_initialize':
bluecloth.c:190:9: warning: unused variable 'utf8text'
make: *** [bluecloth.o] Error 1

Gem files will remain installed in c:/Ruby187/lib/ruby/gems/1.8/gems/
bluecloth-2.0.10 for inspection.
Results logged to c:/Ruby187/lib/ruby/gems/1.8/gems/bluecloth-2.0.10/
ext/gem_make.out

C:\test\typo>

Luis Lavena

unread,
Feb 8, 2011, 6:49:37 AM2/8/11
to rubyin...@googlegroups.com
On Tue, Feb 8, 2011 at 7:55 AM, Jaymin <sja...@gmail.com> wrote:
> WIth Ruby 187, I had downloaded devkit from http://rubyinstaller.org/downloads
> and followed the instruction per https://github.com/oneclick/rubyinstaller/wiki/Development-Kit.
> I had also ensured that devkit is installed properly by following
> smoke test.
>
> I had then tried installing bluecloth (v2.0.10). It had failed with
> following error:
>
> C:\test\typo>gem install bluecloth --platform=ruby
>

Seems to me that 2.0.10 is broken. 2.0.9 installed properly:

C:\Users\Luis>gem install bluecloth -v 2.0.9
Fetching: bluecloth-2.0.9.gem (100%)


Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...

Successfully installed bluecloth-2.0.9
1 gem installed

For 2.0.10 I get the same error.

I would suggest report it to the gem author:

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

--
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

Jaymin

unread,
Feb 8, 2011, 7:08:17 AM2/8/11
to RubyInstaller
Thanks for your reply. With other version I am facing different issue
as follows. In morning I had tried to log issue on below site but I
was not able register since confirmation email is working on that
site.

I had tried it before with v2.0.5 and had below error. I have tried
with 2.0.9 too

C:\test\typo>gem install bluecloth -v 2.0.9 --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed bluecloth-2.0.9
1 gem installed
Installing ri documentation for bluecloth-2.0.9...
Installing RDoc documentation for bluecloth-2.0.9...

C:\test\typo>rake db:create
(in C:/test/typo)
rake aborted!
no such file to load -- 1.8/bluecloth_ext
c:/ruby187/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in
`raw_load_rakef
ile'
(See full trace by running task with --trace)

Also, tried following:

C:\test\typo>irb -rubygems
irb(main):001:0> require 'bluecloth'
LoadError: no such file to load -- 1.8/bluecloth_ext
from c:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:31:in `gem_original_require'
from c:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:31:in `require'
from c:/Ruby187/lib/ruby/gems/1.8/gems/bluecloth-2.0.9/lib/
bluecloth.rb:161
from c:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:36:in `gem_original_require'
from c:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:36:in `require'
from (irb):1
irb(main):002:0>


On Feb 8, 4:49 pm, Luis Lavena <luislav...@gmail.com> wrote:
> On Tue, Feb 8, 2011 at 7:55 AM, Jaymin <sjay...@gmail.com> wrote:
> > WIth Ruby 187, I had downloaded devkit fromhttp://rubyinstaller.org/downloads
> > and followed the instruction perhttps://github.com/oneclick/rubyinstaller/wiki/Development-Kit.

Jaymin

unread,
Feb 8, 2011, 7:10:00 AM2/8/11
to RubyInstaller
*** Thanks for your reply. With other version I am facing different
issue
as follows. In morning I had tried to log issue on below site but I
was not able register since confirmation email is NOT working on that
site.

Luis Lavena

unread,
Feb 8, 2011, 7:17:00 AM2/8/11
to rubyin...@googlegroups.com
On Tue, Feb 8, 2011 at 9:08 AM, Jaymin <sja...@gmail.com> wrote:
> Thanks for your reply. With other version I am facing different issue
> as follows. In morning I had tried to log issue on below site but I
> was not able register since confirmation email is working on that
> site.
>
> I had tried it before with v2.0.5 and had below error. I have tried
> with 2.0.9 too
>

The issue I see with 2.0.9 is that is expecting the extension be
located inside 1.8 folder inside the lib directory of the gem.

http://deveiate.org/projects/BlueCloth/browser/lib/bluecloth.rb#L183

That is wrong.

It should be something like the following lines:

https://github.com/luislavena/sqlite3-ruby/blob/master/lib/sqlite3.rb

I've just sent a message to the author on GitHub.

ged

unread,
Feb 8, 2011, 11:03:40 AM2/8/11
to RubyInstaller
On Feb 8, 7:17 am, Luis Lavena <luislav...@gmail.com> wrote:
> The issue I see with 2.0.9 is that is expecting the extension be
> located inside 1.8 folder inside the lib directory of the gem.
>
> http://deveiate.org/projects/BlueCloth/browser/lib/bluecloth.rb#L183
>
> That is wrong.
>
> It should be something like the following lines:
>
> https://github.com/luislavena/sqlite3-ruby/blob/master/lib/sqlite3.rb
>
> I've just sent a message to the author on GitHub.

I'll get this fixed ASAP.

Jaymin

unread,
Feb 8, 2011, 11:37:50 AM2/8/11
to RubyInstaller
Thanks a lot for all you help and support.

I look forward to get fix soon.

regards,
Jaymin

Jaymin

unread,
Feb 8, 2011, 11:47:19 PM2/8/11
to RubyInstaller
Hi,

I was wondering if there is any workaround to this while it is being
fixed. E.g. copying generated file to expected location etc.

This may allow us to move ahead with our work.

regards,
Jaymin
Message has been deleted

James Cowlishaw

unread,
Feb 9, 2011, 1:58:02 AM2/9/11
to rubyin...@googlegroups.com
On 9 Feb 2011, at 04:49, Jaymin Shah <sja...@gmail.com> wrote:

Hi,

I was wondering if there is any workaround to this while it is being fixed. e.g. copying generated file to expected location etc.


This may allow us to move ahead with our work.


regards,

Jaymin


Yes, you could copy the extension to the expected location, or you could apply Luis' mentioned fix locally, then build the bluecloth gem & install.

James.

Jaymin

unread,
Feb 9, 2011, 4:13:01 AM2/9/11
to RubyInstaller
Hi,

Thanks for your swift repy. I have tried with following copy scenaior
but did not helped.

1) C:\Ruby187\lib\ruby\gems\1.8\gems\bluecloth-2.0.9 to C:\Ruby187\lib
\1.8\gems\bluecloth-2.0.9

2) C:\Ruby187\lib\ruby\gems\1.8\gems\bluecloth-2.0.9 to C:\Ruby187\lib
\1.8\bluecloth-2.0.9

3) C:\Ruby187\lib\ruby\gems\1.8\gems\bluecloth-2.0.9\ext contents to C:
\Ruby187\lib\1.8\bluecloth-2.0.9

4) C:\Ruby187\lib\ruby\gems\1.8\gems\bluecloth-2.0.9\ext contents to C:
\Ruby187\lib\ruby\gems\1.8\

Also, tried few others scenarios like content of bluecloth-2.0.9 in C:
\Ruby187\lib\1.8\ as well as C:\Ruby187\lib\1.8\bluecloth_ext folder
but none of them worked.

Can you please let me know exact path to copy/follow as workaround.

ps: I am infant in ruby world :-)

regards,
Jaymin


On Feb 9, 11:58 am, James Cowlishaw <cowli...@gmail.com> wrote:

James Cowlishaw

unread,
Feb 9, 2011, 5:14:00 AM2/9/11
to rubyin...@googlegroups.com
On 9 February 2011 09:13, Jaymin <sja...@gmail.com> wrote:
Hi,

Thanks for your swift repy. I have tried with following copy scenaior
but did not helped.

1) C:\Ruby187\lib\ruby\gems\1.8\gems\bluecloth-2.0.9 to C:\Ruby187\lib
\1.8\gems\bluecloth-2.0.9

2) C:\Ruby187\lib\ruby\gems\1.8\gems\bluecloth-2.0.9 to C:\Ruby187\lib
\1.8\bluecloth-2.0.9

3) C:\Ruby187\lib\ruby\gems\1.8\gems\bluecloth-2.0.9\ext contents to C:
\Ruby187\lib\1.8\bluecloth-2.0.9

4) C:\Ruby187\lib\ruby\gems\1.8\gems\bluecloth-2.0.9\ext contents to C:
\Ruby187\lib\ruby\gems\1.8\

Also, tried few others scenarios like content of bluecloth-2.0.9 in C:
\Ruby187\lib\1.8\ as well as C:\Ruby187\lib\1.8\bluecloth_ext folder
but none of them worked.

Can you please let me know exact path to copy/follow as workaround.

ps: I am infant in ruby world :-)

regards,
Jaymin


Sorry Jaymin,
I have my machine to hand now. For an immediate fix, copy:

    C:\Ruby187\lib\ruby\gems\1.8\gems\bluecloth-2.0.9\lib\bluecloth_ext.so
to
    C:\Ruby187\lib\ruby\gems\1.8\gems\bluecloth-2.0.9\lib\1.8\bluecloth_ext.so

James. 

Luis Lavena

unread,
Feb 9, 2011, 7:12:18 AM2/9/11
to rubyin...@googlegroups.com
On Wed, Feb 9, 2011 at 1:47 AM, Jaymin <sja...@gmail.com> wrote:
> Hi,
>
> I was wondering if there is any workaround to this while it is being
> fixed. E.g. copying generated file to expected location etc.
>
> This may allow us to move ahead with our work.
>

Please install version 2.0.7, which already provides binaries for mingw32

gem install bluecloth -v 2.0.7

Luis Lavena

unread,
Feb 10, 2011, 5:55:41 PM2/10/11
to rubyin...@googlegroups.com
On Wed, Feb 9, 2011 at 9:12 AM, Luis Lavena <luisl...@gmail.com> wrote:
> On Wed, Feb 9, 2011 at 1:47 AM, Jaymin <sja...@gmail.com> wrote:
>> Hi,
>>
>> I was wondering if there is any workaround to this while it is being
>> fixed. E.g. copying generated file to expected location etc.
>>
>> This may allow us to move ahead with our work.
>>
>
> Please install version 2.0.7, which already provides binaries for mingw32
>
> gem install bluecloth -v 2.0.7

Hello,

I'm happy to inform that the author of bluecloth gem just released
version 2.0.11 which corrects the issue found in this thread and also
includes binaries for 1.8.x and 1.9.2 versions of Ruby.

https://rubygems.org/gems/bluecloth

You can install now with: gem install bluecloth

No need to trigger compilation process.

Thanks everybody for the support and specially the gem author to
provide Windows binaries.

Cheers,

Reply all
Reply to author
Forward
0 new messages