gpt4 book ai didi

ruby-on-rails - 无法安装特定的 gem

转载 作者:行者123 更新时间:2023-12-03 17:54:56 25 4
gpt4 key购买 nike

我有一个现有的Ruby On Rails项目,我正在尝试启动并运行它,但是当我尝试迁移数据库时,它说:

$ rake db:migrate 

Could not find json-1.6.5 in any of the sources

然后,当我尝试安装特定的gem时,它将失败!
$ gem install json -v '1.6.5'

Fetching: json-1.6.5.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.

/Users/dev/.rvm/rubies/ruby-1.9.2-p136/bin/ruby extconf.rb
creating Makefile

make
sh: make: command not found


Gem files will remain installed in /Users/dev/.rvm/gems/ruby-1.9.2-p136@rails3/gems/json-1.6.5 for inspection.
Results logged to /Users/dev/.rvm/gems/ruby-1.9.2-p136@rails3/gems/json-1.6.5/ext/json/ext/parser/gem_make.out

最佳答案

看来您缺少某些命令行工具。

验证您已安装

$ whereis make


应该返回如下内容:

/usr/bin/make




$ make -v


应该类似于:

GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.0


如果您没有看到类似的内容,也许您应该查看这篇文章 https://stackoverflow.com/a/10217910/335523

关于ruby-on-rails - 无法安装特定的 gem ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10650135/

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