Issue while installing therubyracer-heroku

Issue

I am unable to run middleman server, because dependency therubyracer-heroku is not getting installed!

What I have tried?

I tried installing middleman via the below command:

gem install middleman

And it succeeded. When I started the middleman server using the default configuration:

$ middleman server -p 3456 -e development

I got these errors:

$ middleman server -p 3456 -e development
Could not find libv8-3.11.8.13 in any of the sources
Run `bundle install` to install missing gems.
$ bundle install
src/bootstrapper.cc: In static member function 'static bool v8::internal::Genesis::CompileScriptCached(v8::internal::Vector<const char>, v8::internal::Handle<v8::internal::String>, v8::internal::SourceCodeCache*, v8::Extension*, v8::internal::Handle<v8::internal::Context>, bool)':
src/bootstrapper.cc:1002:18: error: variable 'result' set but not used [-Werror=unused-but-set-variable]
src/bootstrapper.cc: In member function 'bool v8::internal::Genesis::InstallNatives()':
src/bootstrapper.cc:1227:24: error: variable 'name' set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors
scons: *** [obj/release/bootstrapper.o] Error 1
scons: building terminated because of errors.
make: *** [build/v8/libv8.a] Error 2
*** 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=/home/praveen/.rvm/rubies/ruby-1.9.3-p286/bin/ruby
extconf.rb:9:in `<main>': Error compiling V8 (RuntimeError)


Gem files will remain installed in /home/praveen/.rvm/gems/ruby-1.9.3-p286/gems/therubyracer-heroku-0.8.1.pre3 for inspection.
Results logged to /home/praveen/.rvm/gems/ruby-1.9.3-p286/gems/therubyracer-heroku-0.8.1.pre3/ext/v8/gem_make.out

An error occurred while installing therubyracer-heroku (0.8.1.pre3), and Bundler cannot continue.
Make sure that `gem install therubyracer-heroku -v '0.8.1.pre3'` succeeds before bundling.
$ 

I tried uninstalling libv8 and reinstalling. None worked. Okay, those I tried were:

gem uninstall libv8
gem install therubyracer-heroku
gem install therubyracer-heroku -v '0.8.1.pre3'
gem install therubyracer-heroku-0.8.1.pre3 # psst: I know this is crazy.
gem install therubyracer # succeeded, but this is not what I need.
gem install bundler
gem install bundle
bundle install # crazy things I tried but no luck!

Output of gem install therubyracer-heroku -v '0.8.1.pre3'

src/bootstrapper.cc:1002:18: error: variable 'result' set but not used [-Werror=unused-but-set-variable]
src/bootstrapper.cc: In member function 'bool v8::internal::Genesis::InstallNatives()':
src/bootstrapper.cc:1227:24: error: variable 'name' set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors
scons: *** [obj/release/bootstrapper.o] Error 1
scons: building terminated because of errors.
make: *** [build/v8/libv8.a] Error 2
*** 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=/home/praveen/.rvm/rubies/ruby-1.9.3-p286/bin/ruby
extconf.rb:9:in `<main>': Error compiling V8 (RuntimeError)


Gem files will remain installed in /home/praveen/.rvm/gems/ruby-1.9.3-p286/gems/therubyracer-heroku-0.8.1.pre3 for inspection.
Results logged to /home/praveen/.rvm/gems/ruby-1.9.3-p286/gems/therubyracer-heroku-0.8.1.pre3/ext/v8/gem_make.out

Gemfile contents for your info!

source 'https://rubygems.org'

gem "thin"
gem "rack-contrib"

gem "middleman"
gem "middleman-livereload", :git => "https://github.com/middleman/middleman-livereload.git"
gem "middleman-smusher", :git  => "https://github.com/middleman/middleman-smusher.git"
gem "middleman-favicon-maker", :git => "https://github.com/follmann/middleman-favicon-maker.git"


gem "slim"
gem "compass-rgbapng"
gem "sassy-buttons"

group :development do
  gem 'heroku'
  gem 'foreman'
  gem 'therubyracer-heroku', '0.8.1.pre3'
  gem 'oj'
end

group :production do
  gem 'therubyracer-heroku', '0.8.1.pre3'
  gem 'oj'
end

So, any ideas to fix this issue?

Answers


Please use the current version of therubyracer (0.11.4 as of this writing), and not therubyracer-heroku. It is no longer needed since the main gem is compatible with heroku and no longer maintained.

The ordinary gem is now compatible with heroku so just

gem "therubyracer"

in your Gemfile should do the trick


Need Your Help

How to implement chat in an app which uses facebook-ios-sdk

iphone objective-c ios chat quickblox

I am developing an iphone app which uses facebook-ios-sdk. For chating i used quickblox sdk. But it results a mac-o-linker error. Is there any other sdk fot chat ?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.