简体   繁体   中英

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?

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.

Try below command

gem install YOUR_GEM_NAME --platform=mswin32

example

gem install hpricot --platform=mswin32

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM