[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Ruby 1.9.1 on windows

Ian Hobson

5/6/2009 1:05:00 PM

Hi all,

How can I install Ruby 1.9.1 on Windows?

The one click installer is still at version 1.8.6.

Thanks

Ian


8 Answers

Roger Pack

5/6/2009 1:13:00 PM

0

Ian Hobson wrote:
> Hi all,
>
> How can I install Ruby 1.9.1 on Windows?

http://rubyinstaller.org/... might work.
-=r
--
Posted via http://www.ruby-....

Ian Hobson

5/6/2009 3:53:00 PM

0

Roger Pack wrote:
> Ian Hobson wrote:
>
>> Hi all,
>>
>> How can I install Ruby 1.9.1 on Windows?
>>
>
> http://rubyinstaller.org/... might work.
> -=r
>
Thanks Roger.

That D/L contains no instructions, so I unpacked it. and added the "bin"
directory to my path.

Now

gem install webby

says it has to build a native extension, and then collapses because
"make" is not a command.

I thought it would use rake - which is installed.

So I have gem (Version 1.3.1), rake (Version 0.8.3) but not tha ability
to install gems.

I suspect the solution is really simple. (An environment variable perhaps).

Ian




Thomas Volkmar Worm

5/6/2009 6:38:00 PM

0

Hello Ian,

I guess, you can install gems, but not those which have extensions
written in C, since this implies that you need a C-compiler etc. On Linux
you always have gcc and gem can build those extensions. Pure ruby gems
should work, if they do not depend on other gems, which use a C-
extension. Have you tried this?

BTW: This is not a ruby problem, perl suffers from the same problem on
windows. StrawberryPerl is one approach to solve this problem. I would
like to see a StrawberryRuby ;-)

Thomas

Dominic Sisneros

5/6/2009 6:41:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

Here is how I got this partially working for me. By partially, it correctly
makes some gems but for others, it can't compile files because of missing
headers (sqlite, sqlite3). It automatically tries to make the file instead
of trying to use the ones compiled for mswin32 platform. I don't know how to
change this

Copy and install the devkit as well
http://rubyinstaller.org/...devkit-2...

put this under the ruby directory

c:\ruby\devkit

add the path for devkit binaries to PATH

set PATH=C:/ruby/devkit/gcc/3.4.5/bin; %PATH%

make sure the fstab in msys is correct
c:/ruby-mingw/devkit/msys/1.0.11/etc/fstab

mine is
c:/ruby/devkit/gcc/3.4.5 /mingw
C:/ruby/devkit/msys/1.0.11/usr/local /usr/local



On Wed, May 6, 2009 at 9:53 AM, Ian Hobson <ian.hobson@ntlworld.com> wrote:

> Roger Pack wrote:
>
>> Ian Hobson wrote:
>>
>>
>>> Hi all,
>>>
>>> How can I install Ruby 1.9.1 on Windows?
>>>
>>>
>>
>> http://rubyinstaller.org/... might work.
>> -=r
>>
>>
> Thanks Roger.
>
> That D/L contains no instructions, so I unpacked it. and added the "bin"
> directory to my path.
>
> Now
>
> gem install webby
>
> says it has to build a native extension, and then collapses because "make"
> is not a command.
>
> I thought it would use rake - which is installed.
>
> So I have gem (Version 1.3.1), rake (Version 0.8.3) but not tha ability to
> install gems.
>
> I suspect the solution is really simple. (An environment variable perhaps).
>

Roger Pack

5/6/2009 7:01:00 PM

0

> That D/L contains no instructions, so I unpacked it. and added the "bin"
> directory to my path.


I am to submit some new instructions to it soon :)

Here are some:
for the files at: http://rubyinstaller.org/...

unzip a {1.8.6,1.9}.7z file somewhere

rename/move it to c:\Ruby

i.e.
c:\Ruby has
bin
lib
share

then unzip the devkit.7z and move its contents into the same folder.

i.e.

c:\Ruby now has
bin
lib
share
devkit
INSTALL.txt

(note: the message "This folder already contains a folder named bin" is
expected--choose "yes" to confirm folder replace).


next add c:\Ruby\bin to the beginning of your path and enjoy the power
of a faster ruby with a compiler.
Let me know if that doesn't help.
Thank you!
-=r
--
Posted via http://www.ruby-....

Roger Pack

5/6/2009 7:04:00 PM

0

Dominic Sisneros wrote:
> Here is how I got this partially working for me. By partially, it
> correctly
> makes some gems but for others, it can't compile files because of
> missing
> headers (sqlite, sqlite3). It automatically tries to make the file
> instead
> of trying to use the ones compiled for mswin32 platform. I don't know
> how to
> change this

For gems that require headers you can usually try

gem install gemname --platform=mswin32

it *should* be binary compatible :)

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

Luis Lavena

5/6/2009 7:32:00 PM

0

2009/5/6 Dominic Sisneros <dsisnero@gmail.com>:
> Here is how I got this partially working for me.=A0 By partially, it corr=
ectly
> makes some gems but for others, it can't compile files because of missing
> headers (sqlite, sqlite3).=A0 It automatically tries to make the file ins=
tead
> of trying to use the ones compiled for mswin32 platform. I don't know how=
to
> change this
>

Clarifying some points:

1) Gems that depends on externals (mysql, sqlite3, postgres) will
require the headers and libraries. On Windows, Linux or any OS, so is
not our fault.

2) if with "It automatically tries to make the file instead of trying
to use the ones compiled for mswin32 platform" you mean installing
pre-compiled mswin32 gems on mingw32... please read this:

http://blog.mmediasys.com/2008/08/10/rubygems-with-power-comes-res...
ty/

My advice is not force the platforms, and don't expect RubyGems take
your mswin32 gem as valid under mingw32.

--=20
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=E9ry

Roger Pack

5/7/2009 6:39:00 AM

0

>
> http://blog.mmediasys.com/2008/08/10/rubygems-with-power-comes-respo...
>
> My advice is not force the platforms, and don't expect RubyGems take
> your mswin32 gem as valid under mingw32.

yes much safer to use mingw compiled binaries (either by yourself or
packages as binary gems). Barring their existence and your desire to
download headers first, you can try to force the platform.
Good luck.
-=r
--
Posted via http://www.ruby-....