Cannot bundle install due to missing therubyracer

ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
rails 3.1.3
Ubuntu 10.04 LTS

I have another environment with MacOSX Snow Leopard, and am sharing the
Rails project files through Dropbox.
When I chose to develop a project further in this Ubuntu machine, I have
executed ‘bundle install’ which gave an error

#---------
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
extension.

    /home/soichi/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb

*** 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.

An error occured while installing therubyracer (0.9.10), and Bundler
cannot continue.
Make sure that gem install therubyracer -v '0.9.10' succeeds before
bundling.
#----------

so, I did “gem install therubyracer -v ‘0.9.10’” as told.
But it gave an error,

#----------
*** 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.
#----------

I tried to find the log file by

find ~/.rvm/ -type f -name “mkmf.log” |grep therubyracer

but there is no such log file.

Can anyone point out the problems causing this “bundle install” error?

On 25 August 2012 10:40, Soichi I. [email protected] wrote:

#---------
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
extension.

Make sure you have all the build environment packages installed. For
Ubuntu I do
sudo apt-get install build-essential bison openssl libreadline6
libreadline6-dev curl git-core
zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev autoconf
libc6-dev ncurses-dev automake
libtool

Colin

Thanks for the reply. I have finally mek it work by installing from
the source rather than apt-get.

soichi