I changed my MAC OSX version to Lion. After that, I try to create a new Rails 3.2.3 App. However there is a error like while running bundle install,
Installing sqlite3 (1.3.6) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/ender/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb checking for sqlite3.h... *** extconf.rb failed *** Could not create
Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/Users/ender/.rvm/rubies/ruby-1.9.3-p0/bin/ruby --with-sqlite3-dir --without-sqlite3-dir --with-sqlite3-include --without-sqlite3-include=${sqlite3-dir}/include --with-sqlite3-lib --without-sqlite3-lib=${sqlite3-dir}/lib --enable-local --disable-local /Users/ender/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:381:in
try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/ender/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:506:in
try_cpp' from /Users/ender/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:970:inblock in find_header' from /Users/ender/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:790:in
block in checking_for' from /Users/ender/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:284:inblock (2 levels) in postpone' from /Users/ender/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:254:in
open' from /Users/ender/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:284:inblock in postpone' from /Users/ender/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:254:in
open' from /Users/ender/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:280:inpostpone' from /Users/ender/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:789:in
checking_for' from /Users/ender/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:969:infind_header' from extconf.rb:34:in
'Gem files will remain installed in /Users/ender/.rvm/gems/ruby-1.9.3-p0/gems/sqlite3-1.3.6 for inspection. Results logged to /Users/ender/.rvm/gems/ruby-1.9.3-p0/gems/sqlite3-1.3.6/ext/sqlite3/gem_make.out An error occured while installing sqlite3 (1.3.6), and Bundler cannot continue. Make sure that
gem install sqlite3 -v '1.3.6'
succeeds before bundling.
When I try
gem install sqlite3 -v '1.3.6'
I see the same error.
What should I do to fix it?
thanks.
I updated the gems but in this time json error occurs
Installing json (1.6.6) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/ender/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
creating Makefile
make
sh: make: command not found
Gem files will remain installed in /Users/ender/.rvm/gems/ruby-1.9.2-p290/gems/json-1.6.6 for inspection.
Results logged to /Users/ender/.rvm/gems/ruby-1.9.2-p290/gems/json-1.6.6/ext/json/ext/generator/gem_make.out
An error occured while installing json (1.6.6), and Bundler cannot continue.
Make sure that `gem install json -v '1.6.6'` succeeds before bundling.
enders-MacBook-Pro:kodcu ender$ gem install json -v '1.6.6'
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/Users/ender/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
creating Makefile
make
sh: make: command not found
Gem files will remain installed in /Users/ender/.rvm/gems/ruby-1.9.2-p290/gems/json-1.6.6 for inspection.
Results logged to /Users/ender/.rvm/gems/ruby-1.9.2-p290/gems/json-1.6.6/ext/json/ext/generator/gem_make.out