ruby-on-rails – 无法构建gem native扩展(mkmf(LoadError)) –
发布时间:2020-12-16 20:51:31 所属栏目:百科 来源:网络整理
导读:参见英文答案 Unable to install gem – Failed to build gem native extension – cannot load such file — mkmf (LoadError)8个 嘿,我正在尝试在新的ubuntu机器上安装rails.我安装了ruby和rvm但是我收到了“未能构建gem native扩展”的错误.这是什么意思
参见英文答案 >
Unable to install gem – Failed to build gem native extension – cannot load such file — mkmf (LoadError)8个
嘿,我正在尝试在新的ubuntu机器上安装rails.我安装了ruby和rvm但是我收到了“未能构建gem native扩展”的错误.这是什么意思? $sudo gem install rails -v 3.2.9 (没有sudo说我没有权限) 然后它输出了很多’抓取’命令,最终输出了这个错误: Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. /usr/bin/ruby1.9.1 extconf.rb /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from extconf.rb:1:in `<main>' Gem files will remain installed in /var/lib/gems/1.9.1/gems/json-1.8.0 for inspection. Results logged to /var/lib/gems/1.9.1/gems/json-1.8.0/ext/json/ext/generator/gem_make.out 当我打字 $rails server 它说当前没有安装rails 解决方法
可能重复:
Unable to install gem – Failed to build gem native extension – cannot load such file — mkmf (LoadError) 根据您的ruby版本,运行: sudo apt-get install ruby1.9.1-dev (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |