[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Errors installing RedCloth 4.0 on Windows XP

John T.

7/23/2008 12:46:00 PM

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.
--
Posted via http://www.ruby-....

6 Answers

Ja West

7/24/2008 1:32:00 AM

0

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
------------------
Any insight could be useful, RedCloth has a Win32 download but no
special instructions on how to get this to work on a Windows
installation. I even tried finding a copy of nmake, but that didn't
solve the problem either...
--
Posted via http://www.ruby-....

Jason Garber

7/24/2008 10:02:00 AM

0

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
--
Posted via http://www.ruby-....

John T.

7/24/2008 12:23:00 PM

0

Jason Garber wrote:
> 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>
--
Posted via http://www.ruby-....

Jason Garber

7/24/2008 1:33:00 PM

0

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
> 1
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
--
Posted via http://www.ruby-....

John T.

7/24/2008 2:40:00 PM

0

Jason Garber wrote:
> 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 :)

--
Posted via http://www.ruby-....

Ja West

7/24/2008 3:20:00 PM

0

John T. wrote:
> Jason Garber wrote:
>> 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 :)

Yay! Works for me too now, thanks Jason!
--
Posted via http://www.ruby-....