Rails/Ruby Error When Creating Database: Unable to load the EventMachine C extension

后端 未结 7 1516
野的像风
野的像风 2020-12-18 04:09

Update:

the eventmachine gem is installed and in my gemfile:

 eventmachine (1.0.0, 0.12.10)

Please help! T

相关标签:
7条回答
  • 2020-12-18 04:26

    Make sure you bundle eventmachine in your Gemfile

    gem "eventmachine"
    

    Then bundle install. This comment seemed relevant to you.

    0 讨论(0)
  • 2020-12-18 04:27

    Someone kind of answered in comments...see below.

    Basically though I had seperate versions of Ruby, which was getting confusing because some gems were only installed on certain versions of ruby.

    Fix was totally uninstalling ruby and rails, then reinstalling. Fixed it!

    This helped:

    This comment in another thread seems promising for your issue. Can you ensure that you have "gem eventmachine" or similar in your Gemfile, and can successfully bundle? – Scott Helm Jan 6 at 6:24

    0 讨论(0)
  • 2020-12-18 04:28

    If any of this solutions don't work, try reinstalling eventmachine gem from sources using method that worked for me on OS X: https://stackoverflow.com/a/20950026/83055

    0 讨论(0)
  • 2020-12-18 04:29

    try to re-install the gem 'eventmachine'

    $ gem uninstall eventmachine
    

    then

    $ bundle install  ( in the same folder with your Gemfile) 
    

    or just

    $ gem install eventmachine ( if you are not using the Gemfile) 
    

    see: https://stackoverflow.com/a/15140634/445908

    0 讨论(0)
  • 2020-12-18 04:32

    I got the same error on Windows after upgrading ruby from 1.9.3 to 2.4. I tried every fix I found but the only thing that helped in the end was (not that obvious and therefore hard to find) to reinstall the new Ruby again with 32 bit instead of 64.

    Also I installed Eventmachine with

    gem install eventmachine --platform=ruby
    

    to force native compilation, since I always get problems with msgpack, that can be solved like this (haven't tried it with the default x86-mingw32)

    0 讨论(0)
  • 2020-12-18 04:33

    I am on windows 10. C:\Ruby25-x64\lib\ruby\gems>bundle install showed Could not locate Gemfile error(though, i am having bundle gem installed and present at \gems location). Following worked for me to resolve Unable to load the EventMachine C extension error:

    1. gem uninstall eventmachine
    2. gem install eventmachine --platform ruby
    0 讨论(0)
提交回复
热议问题