2

I have an exsisting Ruby On Rails project that I am trying to get up and running, but when I try to migrate the db it says:

$ rake db:migrate 

Could not find json-1.6.5 in any of the sources

When I then try to install the specfic gem, it fails!

$ 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
Hugo
  • 12,334
  • 6
  • 30
  • 36
lmkk
  • 609
  • 2
  • 9
  • 21

2 Answers2

2

It looks like you are missing some command line tools.

verify that you have make installed

$ whereis make

should return something like:

/usr/bin/make

and

$ make -v

should be similar to:

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

If you do not see something like this maybe you should check out this post https://stackoverflow.com/a/10217910/335523

Community
  • 1
  • 1
Hugo
  • 12,334
  • 6
  • 30
  • 36
0

I think you need to install the system dependent package libjson-ruby for ruby. Installing this package will solve this error.

Mohanraj
  • 4,056
  • 2
  • 22
  • 24
  • tried gem install libjson-ruby, and it was not found. When I google it - it looks like it is a gem for Debian. I am running Mac.And when I do a gem list --remote json there is nothing called libjson-ruby – lmkk May 18 '12 at 10:03