在为sinatra应用程序加载瘦for服务器时,我不断收到
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require em/pure_ruby'<path>/vendor/bundle/ruby/1.9.1/gems/eventmachine-1.0.0.rc.4/lib/eventmachine.rb:8:in `require': cannot load such file -- rubyeventmachine (LoadError)
from <path>/vendor/bundle/ruby/1.9.1/gems/eventmachine-1.0.0.rc.4/lib/eventmachine.rb:8:in `<top (required)>'
from <path>/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin.rb:7:in `require'
from <path>/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin.rb:7:in `<top (required)>'
from <path>/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/bin/thin:5:in `require'
from <path>/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/bin/thin:5:in `<top (required)>'
from <path>/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'
from <path>/vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>'在我的Mac中,我启动服务器没有任何问题,但是在我的服务器上,这是一个Red Hat Enterprise Linux server版本6.2 (圣地亚哥),我不能启动我的应用程序。
我使用的是rvm 1.18.5和ruby-1.9.3-p374
提前致以问候和感谢。
有人遇到过这个问题吗?
发布于 2013-01-31 18:32:30
我已经解决了这个问题,转储我的大多数Bundler配置的gem,并将它们直接安装到我的全局gem集中。我不得不从Sinatra中删除所有的Bundler引用,加载代码,只使用rubygems。现在,我只需要用Bundler来测试cucumber和部署capistrano。
发布于 2013-12-19 18:01:28
尝试重新安装gem 'eventmachine':
$ gem uninstall eventmachine
$ gem install eventmachine
or
$ bundle install发布于 2018-04-09 07:21:32
我通过卸载homebrew的Ruby2.5版本修复了我的"Unable to load EventMachine C extension“错误。在Rails/Ruby Error When Creating Database: Unable to load the EventMachine C extension上查看此评论
https://stackoverflow.com/questions/14610091
复制相似问题