Forum: Ruby Ruby 1.9.1 on windows

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ian H. (Guest)
on 2009-05-06 17:06
(Received via mailing list)
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
Roger P. (Guest)
on 2009-05-06 17:12
Ian H. wrote:
> Hi all,
>
> How can I install Ruby 1.9.1 on Windows?

http://rubyinstaller.org/downloads/ might work.
-=r
Ian H. (Guest)
on 2009-05-06 19:56
(Received via mailing list)
Roger P. wrote:
> Ian H. wrote:
>
>> Hi all,
>>
>> How can I install Ruby 1.9.1 on Windows?
>>
>
> http://rubyinstaller.org/downloads/ 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 W. (Guest)
on 2009-05-06 22:40
(Received via mailing list)
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 S. (Guest)
on 2009-05-06 22:43
(Received via mailing list)
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/downloads/devkit-20090411.7z

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
Roger P. (Guest)
on 2009-05-06 23:01
> 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/downloads/

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
Roger P. (Guest)
on 2009-05-06 23:03
Dominic S. 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
Luis L. (Guest)
on 2009-05-06 23:32
(Received via mailing list)
2009/5/6 Dominic S. <removed_email_address@domain.invalid>:
> 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
>

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

My advice is not force the platforms, and don't expect RubyGems take
your mswin32 gem as valid under mingw32.
Roger P. (Guest)
on 2009-05-07 10:38
>
> http://blog.mmediasys.com/2008/08/10/rubygems-with...
>
> 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
This topic is locked and can not be replied to.