Installing Ruby 1.9.1 Binary on Windows Vista

I’ve searched and only found one topic which did not have an answer or
explanation on how to install Ruby 1.9.1 Binary on windows.

Is there a “tutorial” or “documentation” on how to correctly install the
binary version on windows?

I find it hard to believe that some type of documentation would not be
available. There is no one-click installer for 1.9.1 so I don’t mind
doing it the old fashioned way if I knew how to do so properly.

Thanks.

On May 27, 1:03 pm, Joel D. [email protected] wrote:

I’ve searched and only found one topic which did not have an answer or
explanation on how to install Ruby 1.9.1 Binary on windows.

Is there a “tutorial” or “documentation” on how to correctly install the
binary version on windows?

I find it hard to believe that some type of documentation would not be
available. There is no one-click installer for 1.9.1 so I don’t mind
doing it the old fashioned way if I knew how to do so properly.

This has been commented and discussed several times in this mailing
list by myself and my other developers.

You can go the mswin32 route which require you actualy READ the
install instructions at garbage collect site:

http://www.garbagecollect.jp/ruby/mswin32/en/
http://www.garbagecollect.jp/ruby/mswin32/en/documents/install.html

Or, to stay DRY with my answers:

http://blog.mmediasys.com/2009/05/05/rubyinstaller-state-of-one-click/
http://blog.mmediasys.com/2009/05/17/rubyinstaller-updated-packages-and-other-news/
http://blog.mmediasys.com/2009/05/19/pure-ruby-readline-released-012/

Bookmarking those links - many thanks.

Is there a “tutorial” or “documentation” on how to correctly install the
binary version on windows?

Here’s my crack at a tutorial.
This is to install versions built with mingw (i.e. pre releases for the
one click installer).

Cheers!
-=r

Roger P. wrote:

Is there a “tutorial” or “documentation” on how to correctly install the
binary version on windows?

Here’s my crack at a tutorial.
This is to install versions built with mingw (i.e. pre releases for the
one click installer).
Programming gone awry: ruby 1.9 one click installer
Cheers!
-=r

Thanks Roger,

Can I ask one question though. If I have previously used the installer,
do I need to “uninstall” that version completely before installing the
ming/1.9 version?

I didn’t see that in your link instructions so just wanted to confirm
before going forward with the test.

Thanks.

Here’s my crack at a tutorial.
This is to install versions built with mingw (i.e. pre releases for
the
one click installer).

Cheers!

Hope it helps. For more information
http://groups.google.com/group/trevor-hook

Regards,
Trevor.

Actually I just did…

  1. renamed Ruby to Ruby.old
  2. Followed all the remaining instructions (with exception of the path
    variables for ruby itself)
  3. Ran ruby -v and gcc -v and both worked fine.
  1. Copied Scite into the new Ruby folder.
  2. Ran gem installs and everything is working fine thus far.
  3. Tested a few programs…

So, I believe that if you have the one-click installer already installed
(the path variables are already set).

If you follow all the instructions located in the link and then do what
I listed it does work fine.

If there are any potential flaws with this, please let me know but so
far everything is working…

Thanks Roger,

Can I ask one question though. If I have previously used the installer,
do I need to “uninstall” that version completely before installing the
ming/1.9 version?

Nope–you can have as many as you want on you system, just be aware that
“ruby gem installed commands” will use the first ruby they find in the
path, not necessarily the one they were installed with. So it’s ok to
have multiple versions just realize that it will by default use the
first one in the path.
-=r

One thing I definitely noticed like when I tried to install mysql I had
to do:

gem install mysql --platform=mswin32

and it worked fine…

With other files like ruby-opengl I had to go to the download page,
download the .gem file manually and install the gem locally and it
worked fine.

Testing apps and they all work fine.

Good information - this is exactly what I was looking for!

The only issue I’m finding with upgrading is that some of the gem
binaries are built on another version so I get an error
msvcrt-ruby18.dll was not found. I know it’s occurring because I have
msvcrt-ruby191.dll now and the gem was built with 18 instead of 191.

That’s the only downfall so far.

What I don’t understand is why don’t the gem authors force a certain
“require ruby version” when installing their gems so that we know which
ones are 18 and which ones are 191…

Having to fish for which gems are which and then having to go to the
authors to find a new source is a bit frustrating.

J. D. wrote:

The only issue I’m finding with upgrading is that some of the gem
binaries are built on another version so I get an error
msvcrt-ruby18.dll was not found. I know it’s occurring because I have
msvcrt-ruby191.dll now and the gem was built with 18 instead of 191.

yeah it’s a concern being discussed by the rubygems fellas. For now
with 1.9 your only hope is basically to build “everything binary” from
scratch, which…works on and off.
-=r

On May 28, 10:16 am, “J. D.” [email protected] wrote:

One thing I definitely noticed like when I tried to install mysql I had
to do:

gem install mysql --platform=mswin32

and it worked fine…

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

With other files like ruby-opengl I had to go to the download page,
download the .gem file manually and install the gem locally and it
worked fine.

I believe that is a error in the published gem or how was published at
RubyForge. Please contact the gem developer/author and provide your
feedback.

Roger P. wrote:

J. D. wrote:

The only issue I’m finding with upgrading is that some of the gem
binaries are built on another version so I get an error
msvcrt-ruby18.dll was not found. I know it’s occurring because I have
msvcrt-ruby191.dll now and the gem was built with 18 instead of 191.

yeah it’s a concern being discussed by the rubygems fellas. For now
with 1.9 your only hope is basically to build “everything binary” from
scratch, which…works on and off.
-=r

Well, I’m still new (only going into my second week of ruby). I’ve
already read 1 book but reading/doing are two different things.

Do you have a link or something to that extent that shows how to build a
binary gem from start to finish?

I learn fast but unfortunately with something like this (on a first time
try) I’d be fishing in the dark…

Being frustrated and complaining are really two different things. I
don’t mind being frustrated and I usually will work through issues the
best way that I can. Once I’m up to par on Ruby and understand it much
better, I’d be happy to contribute. I’m the type of person that loves
contributing. Unfortunately, wanting to and knowing how to are also two
different things.

After upgrading to 1.9.1 one of the gems that I want to use is mysql.

When I require it, I receive the following message:

“The application has failed to start because msvcrt-ruby18.dll was not
found.”

I know that is because I need to use msvcrt-ruby191.dll and that the gem
was built with another version.

So, how would I go (step by step) to trying to resolve the issues I’m
having with the mysql gem? Or, rather, what would you do step by step
to resolve the issue?

Many thanks in advance.

So, how would I go (step by step) to trying to resolve the issues I’m
having with the mysql gem? Or, rather, what would you do step by step
to resolve the issue?

Luis is working on a “download system” to help with dependencies,
hopefully released soon.

So there are some binary gems that don’t have dependencies.
i.e.
install ruby + devkit
gem install eventmachine # builds and installs the binary

those that do have dependencies, you have to do more work (here’s where
theoretically, the gem author could provide you with precompiled
binaries so you don’t have to download the dependencies). At least
that’s how it is now.

There were some instructions listed recently on the rubyinstaller dev
mailing list on compiling mysql and sqlite I think. That might help you
:slight_smile:
Also note you’ll need 5.0 not 5.1
GL.
-=r

On May 28, 11:30 am, “J. D.” [email protected] wrote:

The only issue I’m finding with upgrading is that some of the gem
binaries are built on another version so I get an error
msvcrt-ruby18.dll was not found. I know it’s occurring because I have
msvcrt-ruby191.dll now and the gem was built with 18 instead of 191.

Yes, this is already exposed problem with RubyGems:

http://rubyforge.org/pipermail/rubygems-developers/2009-April/004522.html

And suggestion to go with “Fat binaries” are a tempting option I’m
working on with original ideas form Aaron P.:

http://tenderlovemaking.com/2009/05/07/fat-binary-gems-make-the-rockin-world-go-round/

That’s the only downfall so far.

What I don’t understand is why don’t the gem authors force a certain
“require ruby version” when installing their gems so that we know which
ones are 18 and which ones are 191…

Since RubyGems lack the ability to have 2 exact version number gems
(1.2.3) but targetting different Ruby versions (1.8.x, 1.9), renders
required_ruby_version kind of useless (as I pointed in RubyGems
mailing list).

Having to fish for which gems are which and then having to go to the
authors to find a new source is a bit frustrating.

Complain to the authors, or even better, patch and contribute the
changes.

Nothing else can be said since they are contributing for free with
their code for you to enjoy or be frustrated with.

I simplified things for me …

I went back to 1.8.7 (no more errors)

1.9.1 is just not ready from both a gems usable standpoint and
especially a windows standpoint.

There were some instructions listed recently on the rubyinstaller dev
mailing list on compiling mysql and sqlite I think. That might help you
:slight_smile:
Also note you’ll need 5.0 not 5.1
GL.
-=r

Can you point me to the rubyinstaller dev list?

I did manage to find one fix:

gem install kwatch-mysql-ruby --platform=mswin32
–source=http://gems.github.com/

It’s supposed to be a working mysql gem for 1.9.1. However, it gives me
the following error:

*** ERROR: can’t find mysql client library.
*** extconf.rb failed ***

I also saw that if you use linux you can use mysql 5.1 but with windows
you need to use 5.0 - I’m not sure why this is and not sure how that
will affect me going forward. All of my websites are hosted and use
mysql 5.1 - they are also on linux/unix boxes. I just program on a
windows box for convenience.

I appreciate everyone who has helped me out through some of this. I’ve
managed to learn a lot today (even with my frustrations) so that’s not a
bad thing…

Can you point me to the rubyinstaller dev list?

http://rubyforge.org/mail/?group_id=167

I did manage to find one fix:

gem install kwatch-mysql-ruby --platform=mswin32
–source=http://gems.github.com/

It’s supposed to be a working mysql gem for 1.9.1. However, it gives me
the following error:

*** ERROR: can’t find mysql client library.
*** extconf.rb failed ***

I believe you’ll need the mysql headers and libraries installed

I also saw that if you use linux you can use mysql 5.1 but with windows
you need to use 5.0 - I’m not sure why this is and not sure how that
will affect me going forward. All of my websites are hosted and use
mysql 5.1 - they are also on linux/unix boxes. I just program on a
windows box for convenience.

Yeah I’m not sure why yet–no one’s yet looked into it :slight_smile:
Luis did some good work towards his:

however, it’s for mingw + 1.8.6

I wasn’t able to get mysqlplus to compile for windows yet, either
.

Looks like the only way I know of is (assuming ruby 1.9 with devkit)

  1. download “mysql 5.0.x windows without installer”
  2. unzip, put it in c:\mysql
  3. download mysql 2.8.1 binary from tmtm
    MySQL/Ruby
  4. edit extconf so that anywhere it says mswin32 it now says
    mswin32|mingw
    4a) make sure that mysql’s bin are not in your path
  5. run ruby extconf.rb – --with-mysql-include=c:/mysql/include
    –with-mysql-lib=c:/mysql/lib/opt
  6. run make, then run make install
  7. copy libmysql.dll to your path
  8. run ruby -e ‘require “mysql”’

if it works you might be one of the first people ever to use it with 1.9
enjoy1
-=r

I appreciate everyone who has helped me out through some of this. I’ve
managed to learn a lot today (even with my frustrations) so that’s not a
bad thing…

Yeah 1.9 on windows is still pretty cutting edge. Sharp enough to cut
yourself, most definitely.