Installing Ruby 1.9.1 Binary on Windows Vista

L

Luis Lavena

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.

I completely understand your frustration.

Is even more frustrating trying to release Ruby installers for 1.8 and
1.9 when it's own set of test fail, stall or crash.

Not so much confidence in the language itself to be able to support
it :p

I've been working in better-build branch of mysql-gem at GitHub:

http://github.com/luislavena/mysql-gem/tree/better-build

Just one small point: tried to build with 5.1 and failed, so next push
of changes are going to be for MySQL 5.0.

Sorry not been able to help you more, I have on my plate the following
gems:

rake-compiler with fat-binaries (to bundle 1.8 and 1.9 versions of
extensions).

Once that is done, I can move to:

sqlite3-ruby: mostly done, still tests fails on 1.9:

http://pastie.org/486098

mysql-gem is the next in the queue.

Then back to win32console and pretty colors for RSpec and Cucumber,
adding unicode support for 1.9.
 
J

J. D.

Thanks to both of you - a lot!

Well, one nice thing is the fact that I can have multiple instances of
Ruby on my machine (which is very helpful). Not many people can say
with any other language that you just rename 2 folders and everything is
back to working condition, hehe - with ruby you can!

So, I might try doing a few of the suggestions tomorrow (when my brain
unmushes) on the 1.9.1 install folder. I kept it intact and it has most
of the correct gem updates. I really want to try and get the mysql
running and if it works on 1.9.1 with what I use then all the better.

Tomorrow is another day - I'll try again.

I finally got down to working with winapi in Ruby today when I was
finishing up my other book. It was fun to learn some of that stuff with
Ruby.

I still love Ruby and it's ease of use.

Programming is easier than installing! Go figure. :)
 
J

J. D.

I ended up installing VirtualBox and added ubuntu linux to a virtual
drive. I took my time and researched and managed to compile 1.9.1 from
source on ubuntu with rails and everything is working 100% now.

I'll program with ruby (winapi) on windows and I'll program with Ruby on
Rails on linux. As I can use both versions now simultaneously due to
virtual box, this solves all of my programming issues.

Thanks folks.

P.S. I also created a very large topic in the Ruby on Rails forum for
my troubles http://www.ruby-forum.com/topic/188125#new

In this thread towards the bottom, I posted my entire installation
routine for linux in case someone is having similar troubles and happens
to read this thread.

Take care.
 
S

Srinivas P.

Hi Team,

I installed ruby 1.9.2, i am getting follwing error

This application has failed to start because msvcrt-ruby18.dll was not
found. Re-installing the application may fix this problem.

Do you want be to downgrade to 1.9. thanks for your help.

Regards
Srinivas P
 
L

Luis Lavena

Hi Team,

I installed ruby 1.9.2, i am getting follwing error

This application has failed to start because msvcrt-ruby18.dll was not
found. Re-installing the application may fix this problem.

You're receiving this because the gem that you're trying to use has
been compiled for Ruby 1.8.x and these binaries are not compatible
with Ruby 1.9.x

I would recommend installation of the Development Kit as documented in
RubyInstaller wiki:

http://github.com/oneclick/rubyinstaller/wiki/Development-Kit

And when find a gem that does not work, for the installation as shown
in the DevKit instructions (gem install xxx --platform=ruby)

Please note that not all gems suffer this problem. The best to do is
contact the gem author and politely ask provide him a gem with
binaries for Ruby 1.9 too.
 
M

Markus Fischer

Hi Luis,

You're receiving this because the gem that you're trying to use has
been compiled for Ruby 1.8.x and these binaries are not compatible
with Ruby 1.9.x

I've followed your replies here and also on -core and you seem to be
very knowledgeable about Ruby. One thing I noticed about many (mostly
Windows) related questions from user was that they would happen to mix
different binary Ruby versions; accidentally.

Is there no mechanism for gems to depend on specific Ruby version and
arch-types for binaries (sometimes even sources) ?

thanks,
- Markus
 
L

Luis Lavena

Hi Luis,



I've followed your replies here and also on -core and you seem to be
very knowledgeable about Ruby. One thing I noticed about many (mostly
Windows) related questions from user was that they would happen to mix
different binary Ruby versions; accidentally.

Is there no mechanism for gems to depend on specific Ruby version and
arch-types for binaries (sometimes even sources) ?

I've covered this case back in April 2009 on rubygems-devel list:

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

You can define a gem to be targeted at one version of Ruby (using gem
spec required_ruby_version attribute), however, you can't generate a
binary gem that target both 1.8.x and 1.9.x series of Ruby.

There are binary differences between 1.8.x and 1.9.x (different C-API,
different VM, etc) that made these pre-compiled extensions
incompatible.

Aaron Patterson came up with a nice idea called fat-binaries -- the
analogy to universal binaries of OSX -- which provides, under the same
gem binaries for both 1.8 and 1.9 versions of Ruby.

You can see examples of that in binary gems like sqlite3-ruby, mysql,
a series of DataMapper (DO) adapters and Nokogiri itself.

The above mentioned libraries rely on rake-compiler as helper to ease
both the binary gems generation and the fat-binary packaging.

But not all gem developers actually know about this and some of them
don't actually care about Windows binaries due it's complexities.

There are some gems that do not depend on external libraries (e.g.
rdiscount, RedCloth, BlueCloth and others) that only needs a compiler
to build its extension.

For those cases you can use RubyInstaller + DevKit and force the
platform during the gem installation:

gem install rdiscount --platform=ruby

That will trigger the compilation process and you're 100% sure, if it
succeed in the compilation, that the binaries are going to work with
your current version of Ruby.

You can read instructions on installation of these elements in our
wiki:

http://github.com/oneclick/rubyinstaller/wiki/Development-Kit

For the cases that depend on external libraries (mysql, sqlite3-ruby)
you will need to have available the same requirements for a Unix
system: headers and linking libraries available.

That means sometimes just indicate options during the gem
installation:

gem install mysql -- --with-mysql-include=C:/MySQL/include --with-
mysql-lib=C:/MySQL/lib/opt

And others steps required are more depending on the complexity of the
library you're installing.

But, is always better to politely ask the gem author to look into
these issues and also advise him to reach out RubyInstaller group for
assistance in providing these fat-binary gems.
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top