2

起動して実行しようとしている既存の Ruby On Rails プロジェクトがありますが、データベースを移行しようとすると、次のように表示されます。

$ rake db:migrate 

Could not find json-1.6.5 in any of the sources

その後、特定の宝石をインストールしようとすると失敗します!

$ 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
4

2 に答える 2

2

いくつかのコマンドラインツールが不足しているようです。

makeがインストールされていることを確認します

$ 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

于 2012-05-18T11:00:06.990 に答える
0

ruby 用のシステム依存パッケージlibjson-rubyをインストールする必要があると思います。このパッケージをインストールすると、このエラーが解決されます。

于 2012-05-18T09:43:31.220 に答える