HelloWorld
HelloWorld

Reputation: 4349

Rails: json 1.7.5 bundle install issue

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.

Upvotes: 2

Views: 2198

Answers (3)

Grzegorz Dębiński
Grzegorz Dębiński

Reputation: 41

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.

Upvotes: 3

HelloWorld
HelloWorld

Reputation: 4349

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

Upvotes: 0

Claud Kho
Claud Kho

Reputation: 426

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

Upvotes: 2

Related Questions