Restrict Platform for RubyGem Update

J

Jj Jj

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
 
R

Ryan Davis

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

Jj Jj

Ryan said:
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 ?
 
E

Eric Hodel

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 ?

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.
 

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

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,271
Latest member
BuyAtenaLabsCBD

Latest Threads

Top