Eventmachine gem install fail

前端 未结 9 1661
耶瑟儿~
耶瑟儿~ 2020-12-01 07:38

I am not able to install eventmachine

Ok I know this has been asked quite a lot, but no solutions I found has helped me so far.So I posted here as a last resort.

9条回答
  •  眼角桃花
    2020-12-01 08:21

    I could install it, doing this steps:

    1) tried a normal install:

    gem install eventmachine
    

    it fetched the version 1.0.3 of the gem, but failed in the make, because of a variable declaration conflit

    2) edited the file:

    c:\Ruby200-x64\lib\ruby\gems\2.0.0\gems\eventmachine-1.0.3\ext\project.h
    

    and commented the line 97

    //typedef int pid_t;
    

    for a more robust correction, checkout the solution here https://github.com/eventmachine/eventmachine/pull/450/files

    3) then, i've opened command prompt, and went to the gem folder

    c:\Ruby200-x64\lib\ruby\gems\2.0.0\gems\eventmachine-1.0.3
    

    and run:

    gem build eventmachine.gemspec
    

    You need git installed with the git.exe location in the PATH for this to work (such as C:\Users\YourUsername\AppData\Local\GitHub\PORTAB~1\bin).

    4) it generated a eventmachine.gem file on the folder... So I've copied a file to a c:\tmp folder, and went to that folder and from there, I've typed:

    gem install eventmachine-1.0.3.gem --local
    

    And it installed successfully!

提交回复
热议问题