gpt4 book ai didi

ruby-on-rails - 无法安装 rails 3.2.9 : Failed to build gem native extension

转载 作者:数据小太阳 更新时间:2023-10-29 08:27:20 27 4
gpt4 key购买 nike

just cleaned rvm 和 ruby​​ 并重新安装它。我正在尝试安装 Rails,但出现此错误:

gem install rails -v 3.2.9

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.1 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/json-1.8.1/ext/json/ext/generator/gem_make.out

如果我用我的 Gemfile 运行 bundle install,它有 rails 3.2.9 和一些更多的 gem,我会得到这个错误:

An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.1'` succeeds before bundling.

猜猜看。运行建议的命令给我另一个错误:

Building native extensions.  This could take a while...
ERROR: Error installing json:
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.1 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/json-1.8.1/ext/json/ext/generator/gem_make.out

最佳答案

关于ruby-on-rails - 无法安装 rails 3.2.9 : Failed to build gem native extension,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22770528/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com