2

When running bundle I get the following issue...

Installing json (1.7.5) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby extconf.rb creating Makefile

make Makefile:158: * target pattern contains no `%'. Stop.

Gem files will remain installed in /srv/www/socialu.com/https:/github.com/willfults/rails3-jquery-autocomplete.git/ruby/1.9.1/gems/json-1.7.5 for inspection. Results logged to /srv/www/socialu.com/https:/github.com/willfults/rails3-jquery-autocomplete.git/ruby/1.9.1/gems/json-1.7.5/ext/json/ext/generator/gem_make.out An error occured while installing json (1.7.5), and Bundler cannot continue. Make sure that gem install json -v '1.7.5' succeeds before bundling.

I tried doing the following sudo aptitude install ruby1.9.1-dev but that didn't work.

HelloWorld
  • 4,251
  • 8
  • 36
  • 60

3 Answers3

3

On debian, if ruby installed with apt-get try to install ruby-dev package also

#apt-get install ruby-dev

it helped in my case.

2

Try install depedencies:

sudo apt-get install build-essential libssl-dev libreadline5 libreadline5-dev zlib1g zlib1g-dev

Then the usual process

mkdir ~/src && cd ~/src

wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.gz

tar -xvf ruby-1.9.1-p0.tar.gz

cd ruby-1.9.1-p0

./configure

make

make test

sudo make install

And to get rails working properly

sudo gem update --system

sudo gem install rails

and to get sqlite3 working properly

sudo apt-get install sqlite3 libsqlite3-dev

sudo gem install sqlite3-ruby

Community
  • 1
  • 1
Claud Kho
  • 426
  • 4
  • 12
  • Thanks but this error is still there, also if I run gem install json -v '1.7.5' the gem installs but when I run bundle I get the same error again, very strange. – HelloWorld Sep 19 '12 at 15:39
0

The issue was with colons in the makefile... Escaping colons in filenames in a Makefile

Doing this resolved it... https://stackoverflow.com/a/9952952/1026266

Community
  • 1
  • 1
HelloWorld
  • 4,251
  • 8
  • 36
  • 60