Installing ruby-debug19 for ruby 1.9.3p125 without RVM - ruby-on-rails

So I'm attempting to get ruby-debug19 gem installed on an ubuntu box. I'm aware that two of the dependencies are linecache19 and ruby-debug-19, and that the versions up on rubygems are not yet compatibly with the latest release of ruby.
I've found this gist https://gist.github.com/1333785 which describes what I need to do, and I've got this working on my local computer with RVM. However, on this box I've compiled ruby from source and am not using RVM.
I've attempted to install the gems like so
gem install linecache19-0.5.13.gem ruby-debug-base19-0.11.26.gem -- --with-ruby-include=/usr/local/bin/ruby-1.9.3-p125/include
But that fails with the error below. I've noticed that the include directory in RVM is much different than the one in my linux box as well...
gem install linecache19-0.5.13.gem ruby-debug-base19-0.11.26.gem -- --with-ruby-include=/usr/local/bin/ruby-1.9.3-p125/include
Building native extensions. This could take a while...
Successfully installed linecache19-0.5.13
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug-base19-0.11.26.gem:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby-1.9.3-p125/bin/ruby extconf.rb --with-ruby-include=/usr/local/bin/ruby-1.9.3-p125/include
checking for rb_method_entry_t.called_id in method.h... no
checking for rb_control_frame_t.method_id in method.h... no
*** 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=/usr/local/bin/ruby-1.9.3-p125/bin/ruby
--with-ruby-dir
--without-ruby-dir
--with-ruby-include=${ruby-dir}/include
--with-ruby-lib
--without-ruby-lib=${ruby-dir}/lib
extconf.rb:16:in `block in <main>': break from proc-closure (LocalJumpError)
from /usr/local/bin/ruby-1.9.3-p125/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:18:in `call'
from /usr/local/bin/ruby-1.9.3-p125/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:18:in `create_makefile_with_core'
from extconf.rb:32:in `<main>'

Related

Installing therubyracer 0.12.2 with native extensions - Gem::Ext::BuildError: ERROR: Failed to build gem native extension

When installing therubyracer 0.12.2 with native extensions, I get the error:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension
I tried all methods, like uninstalling libv8 then installing therubyracer. Nothing worked for me.
Command and output:
>$ sudo gem install therubyracer -v '0.12.2' --source 'http://rubygems.org/'
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.
/Users/letsventure/.rbenv/versions/2.2.4/bin/ruby -r ./siteconf20191111-5081-xr5qij.rb extconf.rb
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
checking for v8.h... no
*** 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/letsventure/.rbenv/versions/2.2.4/bin/$(RUBY_BASE_NAME)
--with-pthreadlib
--without-pthreadlib
--with-objclib
--without-objclib
--enable-debug
--disable-debug
--with-v8-dir
--without-v8-dir
--with-v8-include
--without-v8-include=${v8-dir}/include
--with-v8-lib
--without-v8-lib=${v8-dir}/lib
/Users/letsventure/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.19/ext/libv8/location.rb:50:in `configure': By using --with-system-v8, you have chosen to use the version (Libv8::Location::System::NotFoundError)
of V8 found on your system and *not* the one that is bundled with
the libv8 rubygem.
However, your system version of v8 could not be located.
Please make sure your system version of v8 that is compatible
with 3.16.14.19 installed. You may need to use the
--with-v8-dir option if it is installed in a non-standard location
from /Users/letsventure/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/libv8-3.16.14.19/lib/libv8.rb:7:in `configure_makefile'
from extconf.rb:32:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Users/letsventure/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/therubyracer-0.12.2 for inspection.
Results logged to /Users/letsventure/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-19/2.2.0-static/therubyracer-0.12.2/gem_make.out
Could anyone please help me to solve this issue? If you know the answer, would you also please explain why this is happening?

Installing ruby gem clamav

I was trying to install clamav gem for a project on windows using ruby on rails.
I used gem install clamav -v '0.4.1'
I keep getting this error:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing clamav:
ERROR: Failed to build gem native extension.
c:/RailsInstaller/Ruby2.0.0/bin/ruby.exe extconf.rb
checking for clamav.h... no
*** 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=c:/RailsInstaller/Ruby2.0.0/bin/ruby
--with-clamav-dir
--without-clamav-dir
--with-clamav-include
--without-clamav-include=${clamav-dir}/include
--with-clamav-lib
--without-clamav-lib=${clamav-dir}/
Gem files will remain installed in c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/clamav-0.4.1 for inspection.
Results logged to c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/clamav-0.4.1/ext/clamav/gem_make.out
I know that there isnt a clamav.h file in the folder for gems in RailsInstaller but it updates from rubygems.org so I cannot change it.
On ubuntu you can install libclamav-dev with following command:
sudo apt-get install libclamav-dev

How to install ruby gem puma on windows

Welcome, gather around.
My first step when trying to install the gem puma is to enter gem install puma --version 2.12.3 into my command prompt. Then this error appears. I don't know what to make of it.
C:\Users>gem install puma --version 2.12.3
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing puma:
ERROR: Failed to build gem native extension.
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20150809-8352-14jkju1.rb extconf.rb
checking for BIO_read() in -lcrypto... no
checking for BIO_read() in -llibeay32... no
*** 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=C:/Ruby22-x64/bin/$(RUBY_BASE_NAME)
--with-puma_http11-dir
--without-puma_http11-dir
--with-puma_http11-include
--without-puma_http11-include=${puma_http11-dir}/include
--with-puma_http11-lib
--without-puma_http11-lib=${puma_http11-dir}/lib
--with-cryptolib
--without-cryptolib
--with-libeay32lib
--without-libeay32lib
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/puma-2
.12.3 for inspection.
Results logged to C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0
/puma-2.12.3/gem_make.out
Please help, thank you!
You probably just need OpenSSL, but be warned that some gems just fail to work on Windows.
https://github.com/hicknhack-software/rails-disco/wiki/Installing-puma-on-windows

gem install therubyracer -v '0.12.1' fails in RubyMine

When I try running the following command
gem install therubyracer -v '0.12.1'
I am getting the following error. I tried to install libv8, but was not successful then. Can someone please help me out here.
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.
C:/software/ruby-1.9.3/bin/ruby.exe extconf.rb
checking for main() in -lpthread... no
checking for v8.h... no
*** 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=C:/software/ruby-1.9.3/bin/ruby
--with-pthreadlib
--without-pthreadlib
--enable-debug
--disable-debug
--with-v8-dir
--without-v8-dir
--with-v8-include
--without-v8-include=${v8-dir}/include
--with-v8-lib
--without-v8-lib=${v8-dir}/
C:/software/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/libv8-
3.16.14.3/ext/libv8/location.rb:50:in `configure': You have chosen to use
the version of V8 found on your system
(Libv8::Location::System::NotFoundError)
and *not* the one that is bundle with the libv8 rubygem. However,
it could not be located. please make sure you have a version of
v8 that is compatible with 3.16.14.3 installed. You may
need to special --with-v8-dir options if it is in a non-standard
location
thanks,
The Mgmt
from C:/software/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/libv8- 3.16.14.3/lib/libv8.rb:7:in `configure_makefile'
from extconf.rb:32:in `<main>'
Gem files will remain installed in C:/software/ruby- 1.9.3/lib/ruby/gems/1.9.1/gems/therubyracer-0.12.1 for inspection.
Results logged to C:/software/ruby- 1.9.3/lib/ruby/gems/1.9.1/gems/therubyracer-0.12.1/ext/v8/gem_make.out
I am new to ruby and therefore I am pretty confused what should be done here.
You can't install therubyracer on Windows, see this post.
Since therubyracer is only one of the javascript runtimes compatible with ExecJS, you may try anothers, say node.js for example.
As long as you're developing Ruby on Rails applications, sooner or later you will have to switch to Unix or Linux, so why not now?

Unable to install therubyracer gem

I installed libv8 gem seperately without a hitch, but when I try to install therubyracer gem I get the following error:
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
checking for main() in -lpthread... yes
Warning! Unable to load libv8 ~> 3.16.14.
*** 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}/
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby
--with-pthreadlib
--without-pthreadlib
--enable-debug
--disable-debug
extconf.rb:32:in `<main>': undefined method `configure_makefile' for Libv8:Module (NoMethodError)
Gem files will remain installed in /home/thecodehitman/ruby/gems/gems/therubyracer-0.12.1 for inspection.
Results logged to /home/thecodehitman/ruby/gems/gems/therubyracer-0.12.1/ext/v8/gem_make.out
Not sure what to do.
Try this:
$ sudo gem install therubyracer --platform ruby
Try with or without sudo.
If it is a Ruby on Rails app, include the line:
gem 'therubyracer', :platform=>:ruby
inside Gemfile.

Resources