Mike Sutton
Mike Sutton

Reputation: 4211

How to install a Linux Rails gem on Windows

I need to upload vendorize a gem which is causing problems at my host - in this case nokogiri. My host is using linux, my development system is windows. The gem contains binaries and so my local gem downloads the win32 binaries. Is there any way I can get gem to download the linux binaries, so I can vendorize and upload them?

Upvotes: 0

Views: 329

Answers (2)

AMIC MING
AMIC MING

Reputation: 6354

Try below command

gem install YOUR_GEM_NAME --platform=mswin32

example

gem install hpricot --platform=mswin32

Upvotes: 0

user65663
user65663

Reputation:

You won't be able to build the Linux version of a gem on Windows. That's why there are multiple platform versions for some gems.

You could download the original source of the Linux version, then simply store that in your repository, if you really want to have a copy of it with your app.

Or you could do all your development in a Linux virtual machine in your Windows box - then you'd have no vendoring problems.

Other than that, don't think you can do it.

Upvotes: 1

Related Questions