在搭建好ruby on rails的环境之后,在新建项目中运行bundle命令遇到以下错误:

 

Gem::InstallerError:The 'json' native gem requires installed build tools

 

解决办法:安装DevKit

RubyInstaller官网下载页面选择适合自己系统的DevKit下载(这里我下载的是最后一个):

Gem::InstallerError:The 'json' native gem requires installed build tools

下载完成后,双击DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe

Gem::InstallerError:The 'json' native gem requires installed build tools

设置解压的文件夹(例如上图C:\DevKit),解压后查看一下,文件夹下的内容如下:

Gem::InstallerError:The 'json' native gem requires installed build tools

 

命令行中进入该目录,输入命令进行初始化:ruby dk.rb init,初始化后提示:

Gem::InstallerError:The 'json' native gem requires installed build tools

 

然后输入ruby dk.rb install进行安装:

Gem::InstallerError:The 'json' native gem requires installed build tools

oh~my ladygaga~~ so fast~~

 

再运行bundle命令时不再出现上述错误:
Gem::InstallerError:The 'json' native gem requires installed build tools

 

高兴呀,转个圈圈~~
Gem::InstallerError:The 'json' native gem requires installed build tools

相关文章:

  • 2022-12-23
  • 2021-12-29
  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-21
  • 2021-11-28
猜你喜欢
  • 2021-10-11
  • 2021-06-29
  • 2022-12-23
  • 2022-12-23
  • 2021-08-17
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案