Errors installing RedCloth 4.0 on Windows XP

J

John T.

I tried installing/upgrading RedCloth to 4.0 on this Windows XP box, but
it throws an error while installing. The machine's got Visual Studio
2003 and 2005 installed, and I tried making sure the PATH was set to
each environment and neither works. The errors are:

C:\Documents and Settings\me>gem install RedCloth
Building native extensions. This could take a while...
ERROR: Error installing RedCloth:
ERROR: Failed to build gem native extension.

c:/ruby/bin/ruby.exe extconf.rb install RedCloth
creating Makefile

nmake

Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

cl -nologo -I. -Ic:/ruby/lib/ruby/1.8/i386-mswin32
-Ic:/ruby/lib/ruby/1.
8/i386-mswin32 -I. -MD -Zi -O2b2xg- -G6 -O2 -c -Tcredcloth_attributes.c
redcloth_attributes.c
ext/redcloth_scan/redcloth_attributes.rl(6) : error C2275: 'VALUE' :
illegal use
of this type as an expression
c:/ruby/lib/ruby/1.8/i386-mswin32\ruby.h(86) : see declaration
of 'VALUE
'
ext/redcloth_scan/redcloth_attributes.rl(6) : error C2146: syntax error
: missin
g ';' before identifier 'buf'
ext/redcloth_scan/redcloth_attributes.rl(3) : error C2275: 'VALUE' :
illegal use
of this type as an expression
c:/ruby/lib/ruby/1.8/i386-mswin32\ruby.h(86) : see declaration
of 'VALUE
'
ext/redcloth_scan/redcloth_attributes.rl(3) : error C2146: syntax error
: missin
g ';' before identifier 'buf'
ext/redcloth_scan/redcloth_attributes.rl(67) : error C2143: syntax error
: missi
ng ';' before 'type'
ext/redcloth_scan/redcloth_attributes.rl(68) : error C2065: 'cs' :
undeclared id
entifier
ext/redcloth_scan/redcloth_attributes.rl(76) : error C2143: syntax error
: missi
ng ';' before 'type'
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.


Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-4.0.0
for inspection.
Results logged to
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-4.0.0/ext/redcloth_sca
n/gem_make.out


Thanks.
 
J

Ja West

I recieved the same sort of problem on my WinXP SP3 box today. I don't
have Visual Studio installed, but I've been playing with Rails on my box
for a while an never had this problem with a gem before:
-----------------
C:\r>gem install RedCloth
Building native extensions. This could take a while...
ERROR: Error installing RedCloth:
ERROR: Failed to build gem native extension.

C:/r/ruby/bin/ruby.exe extconf.rb install RedCloth
creating Makefile

nmake
'nmake' is not recognized as an internal or external command,
operable program or batch file.


Gem files will remain installed in
C:/r/ruby/lib/ruby/gems/1.8/gems/RedCloth-4.0
0 for inspection.
Results logged to
C:/r/ruby/lib/ruby/gems/1.8/gems/RedCloth-4.0.0/ext/redcloth_s
can/gem_make.out
 
J

Jason Garber

I think I know what happened--you're using an older version of RubyGems
and the RedCloth gem I published has a platform name in the new style:
i386-mswin32.

Upgrading RubyGems should help: gem update --system

I'll work on a fix so it's accessible to people with older RubyGems
(pre-1.0, I think). I tested on Windows, but only with RubyGems 1.2.0.

Jason Garber
 
J

John T.

Jason said:
I think I know what happened--you're using an older version of RubyGems
and the RedCloth gem I published has a platform name in the new style:
i386-mswin32.

Upgrading RubyGems should help: gem update --system

I'll work on a fix so it's accessible to people with older RubyGems
(pre-1.0, I think). I tested on Windows, but only with RubyGems 1.2.0.

Jason Garber

Nope. I'm using the latest Rubygems: (I included that I'm running the
VCVARS32.BAT file to install the VS 2003 items into the path. When
trying to use the VS 2005 version, it also fails, but with a different
error - that's at the bottom)

C:\Documents and Settings\me>gem -v
1.2.0

C:\Documents and Settings\me>VCVARS32.BAT
Setting environment for using Microsoft Visual C++ tools.
C:\Documents and Settings\jtsombakos>gem install RedCloth
Building native extensions. This could take a while...
ERROR: Error installing RedCloth:
ERROR: Failed to build gem native extension.

c:/ruby/bin/ruby.exe extconf.rb install RedCloth
creating Makefile

nmake

Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

cl -nologo -I. -Ic:/ruby/lib/ruby/1.8/i386-mswin32
-Ic:/ruby/lib/ruby/1.
8/i386-mswin32 -I. -MD -Zi -O2b2xg- -G6 -O2 -c -Tcredcloth_attributes.c
redcloth_attributes.c
ext/redcloth_scan/redcloth_attributes.rl(6) : error C2275: 'VALUE' :
illegal use
of this type as an expression
c:/ruby/lib/ruby/1.8/i386-mswin32\ruby.h(86) : see declaration
of 'VALUE
'
ext/redcloth_scan/redcloth_attributes.rl(6) : error C2146: syntax error
: missin
g ';' before identifier 'buf'
ext/redcloth_scan/redcloth_attributes.rl(3) : error C2275: 'VALUE' :
illegal use
of this type as an expression
c:/ruby/lib/ruby/1.8/i386-mswin32\ruby.h(86) : see declaration
of 'VALUE
'
ext/redcloth_scan/redcloth_attributes.rl(3) : error C2146: syntax error
: missin
g ';' before identifier 'buf'
ext/redcloth_scan/redcloth_attributes.rl(67) : error C2143: syntax error
: missi
ng ';' before 'type'
ext/redcloth_scan/redcloth_attributes.rl(68) : error C2065: 'cs' :
undeclared id
entifier
ext/redcloth_scan/redcloth_attributes.rl(76) : error C2143: syntax error
: missi
ng ';' before 'type'
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.


Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-4.0.0
for inspection.
Results logged to
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-4.0.0/ext/redcloth_sca
n/gem_make.out

C:\Documents and Settings\me>ruby -v
ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]

(Trying to use VS 2005 settings:)

Setting environment for using Microsoft Visual Studio 2005 x86 tools.

C:\Program Files\Microsoft Visual Studio 8\VC>gem install RedCloth
Building native extensions. This could take a while...
ERROR: Error installing RedCloth:
ERROR: Failed to build gem native extension.

c:/ruby/bin/ruby.exe extconf.rb install RedCloth
creating Makefile

nmake

Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation. All rights reserved.

cl -nologo -I. -Ic:/ruby/lib/ruby/1.8/i386-mswin32
-Ic:/ruby/lib/ruby/1.
8/i386-mswin32 -I. -MD -Zi -O2b2xg- -G6 -O2 -c -Tcredcloth_attributes.c
cl : Command line warning D9035 : option 'Og-' has been deprecated and
will be r
emoved in a future release
cl : Command line warning D9002 : ignoring unknown option '-G6'
redcloth_attributes.c
c:\ruby\lib\ruby\1.8\i386-mswin32\config.h(2) : fatal error C1189:
#error : MSC
version unmatch
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
8\VC\BIN\c
l.EXE"' : return code '0x2'
Stop.


Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-4.0.0
for inspection.
Results logged to
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-4.0.0/ext/redcloth_sca
n/gem_make.out

C:\Program Files\Microsoft Visual Studio 8\VC>
 
J

Jason Garber

You were right, it wasn't a gem version problem. Somehow the win32 gem
file wasn't being picked up by the RubyForge gem process. I
regenerated and uploaded the file again and now it works.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\>gem install RedCloth
Select which gem to install for your platform (i386-mswin32)
1. RedCloth 4.0.0 (x86-mswin32-60)
2. RedCloth 4.0.0 (ruby)
3. RedCloth 3.0.4 (ruby)
4. RedCloth 3.0.3 (ruby)
5. Skip this gem
6. Cancel installation
Successfully installed RedCloth-4.0.0-x86-mswin32-60

C:\>irb -rubygems
irb(main):001:0> RedCloth.new("test").to_html
=> "<p>test</p>"
irb(main):004:0> exit
 
J

John T.

Jason said:
You were right, it wasn't a gem version problem. Somehow the win32 gem
file wasn't being picked up by the RubyForge gem process. I
regenerated and uploaded the file again and now it works.

Yep! That did it! Thanks! (though I had to do a require 'redcloth' in
irb to get the test to work, but it works :)
 
J

Ja West

John said:
Yep! That did it! Thanks! (though I had to do a require 'redcloth' in
irb to get the test to work, but it works :)

Yay! Works for me too now, thanks Jason!
 
M

Maged Makled

Another way that worked for me is

gem install RedCloth --platform=mswin32

hope it helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top