加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 创建数据库时出现Rails / Ruby错误:无法加载E

发布时间:2020-12-16 20:50:05 所属栏目:百科 来源:网络整理
导读:更新: eventmachine gem已安装在我的gemfile中: eventmachine (1.0.0,0.12.10) 请帮忙!尝试使用以下内容创建数据库: Fitzs-MacBook-Pro:twilio_insanity Fitz$rake db:create' 返回以下错误: Unable to load the EventMachine C extension; To use the
更新:

eventmachine gem已安装在我的gemfile中:

eventmachine (1.0.0,0.12.10)

请帮忙!尝试使用以下内容创建数据库:

Fitzs-MacBook-Pro:twilio_insanity Fitz$rake db:create'

返回以下错误:

Unable to load the EventMachine C extension; To use the pure-ruby
reactor,require ’em/pure_ruby’ rake aborted! cannot load such file —
rubyeventmachine
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/eventmachine-1.0.0/lib/eventmachine.rb:8:in
require'
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/eventmachine-1.0.0/lib/eventmachine.rb:8:in

/Users/Fitz/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/thin-1.5.0/lib/thin.rb:7:in
require'
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/thin-1.5.0/lib/thin.rb:7:in

/Users/Fitz/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in
require'
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in
block (2 levels) in require’
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in
each'
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in
block in require’
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in
each'
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in
require’
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.3/lib/bundler.rb:128:in
require'
/Users/Fitz/Desktop/twilio_insanity/config/application.rb:7:in
‘ /Users/Fitz/Desktop/twilio_insanity/Rakefile:5:in
require' /Users/Fitz/Desktop/twilio_insanity/Rakefile:5:in
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/bin/ruby_noexec_wrapper:14:in
eval'
/Users/Fitz/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/bin/ruby_noexec_wrapper:14:in
‘ (See full trace by running task with –trace)

“`

解决方法

尝试重新安装gem’eventmachine’
$gem uninstall eventmachine

然后

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

要不就

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

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读