Restrict Platform for RubyGem Update

I am working on a windows box attempting to develop a rails application.
Is there a way to ensure “gem update” or “gem install x” will not try to
download and compile native ruby gems ?

Thank you for the information!

Joseph

On Mar 26, 2009, at 23:11 , Jj Jj wrote:

I am working on a windows box attempting to develop a rails
application.
Is there a way to ensure “gem update” or “gem install x” will not
try to
download and compile native ruby gems ?

rubygems will download any platform specific gem first if it exists.
Otherwise it’ll download the “ruby” platform. If that gem specifies
that it has extensions to build, it’ll try to build them. There may be
some extra way to specify that you don’t want builds to occur, but I
don’t know it. See gem help install for more.

Ryan D. wrote:

On Mar 26, 2009, at 23:11 , Jj Jj wrote:

I am working on a windows box attempting to develop a rails
application.
Is there a way to ensure “gem update” or “gem install x” will not
try to
download and compile native ruby gems ?

rubygems will download any platform specific gem first if it exists.
Otherwise it’ll download the “ruby” platform. If that gem specifies
that it has extensions to build, it’ll try to build them. There may be
some extra way to specify that you don’t want builds to occur, but I
don’t know it. See gem help install for more.

Thank you for the information. I have reviewed the information for both
install and update.

Does anyone if there is a way to not default back to the ruby platform ?

On Mar 26, 2009, at 23:32, Jj Jj wrote:

Otherwise it’ll download the “ruby” platform. If that gem specifies
platform ?
As of RubyGems 1.3 (IIRC), a failed build shouldn’t result in an
installed gem.

I don’t have MySQL installed on my system, but I forced an install of
the gem:

$ gem list mysql

*** LOCAL GEMS ***

mysql (2.5.1)
$ gem list mysql

*** LOCAL GEMS ***

mysql (2.5.1)
$ sudo gem update mysql
Updating installed gems
Updating mysql
Building native extensions. This could take a while…
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
[…]
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/
mysql-2.5.1 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.5.1/gem_make.out
Nothing to update
$ gem list mysql

*** LOCAL GEMS ***

mysql (2.5.1)
$

So nothing was updated, even though RubyGems tried it’s hardest to do
what you want.