How can I debug Ruby 2.1.1p76 with Intellij 12.1.7? I can run my script just fine, but when I click the debug button, I get a dialog:
The gem ruby-debug-base required by the debugger is not currently installed. Would you like to install it?
When I click yes I get this:
10:36:21 AM Error running e2e
Failed to Install Gems. Following gems were not installed:
linecache (0.46): Error installing linecache:
ERROR: Failed to build gem native extension. /home/jared/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb Can't handle 1.9.x yet *** 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/jared/.rvm/rubies/ruby-2.1.1/bin/ruby extconf failed, exit code 1 Gem files will remain installed in /home/jared/.rvm/gems/ruby-2.1.1#global/gems/linecache-0.46 for inspection. Results logged to /home/jared/.rvm/gems/ruby-2.1.1#global/extensions/x86_64-linux/2.1.0/linecache-0.46/gem_make.out
/home/jared/.IntelliJIdea12/config/plugins/ruby/rb/gems/ruby-debug-base-0.10.5.rc1.gem: Error installing ruby-debug-base-0.10.5.rc1.gem:
ERROR: Failed to build gem native extension. /home/jared/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb Can't handle 1.9.x yet *** 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/jared/.rvm/rubies/ruby-2.1.1/bin/ruby extconf failed, exit code 1 Gem files will remain installed in /home/jared/.rvm/gems/ruby-2.1.1#global/gems/linecache-0.46 for inspection. Results logged to /home/jared/.rvm/gems/ruby-2.1.1#global/extensions/x86_64-linux/2.1.0/linecache-0.46/gem_make.out
I realize that I could upgrade to Intellij 13 to fix this problem, but I don't want to.
You can use Ruby Remote Debug.
Install rdebug-ide:
gem install ruby-debug-ide --pre
Create "Ruby remote debug" configuration in IDEA
Run your script from the terminal:
rdebug-ide --port 1234 --dispatcher-port 26162 -- yourscript.rb
Press "Debug" in IDEA
Related
I am getting the following error while trying to install ffi-yajl
Using berkshelf 4.3.3
Installing ffi-yajl 2.4.0 with native extensions
STDERR: Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/var/lib/gems/2.5.0/gems/ffi-yajl-2.4.0/ext/ffi_yajl/ext/encoder
/usr/bin/ruby2.5 -r ./siteconf20210628-15489-1ggpxn5.rb 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.
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/bin/$(RUBY_BASE_NAME)2.5
extconf.rb:9:in <main>': undefined method include_path' for Libyajl2:Module
(NoMethodError)
Did you mean? include
extconf failed, exit code 1
It seems to be this line that is failing:
https://github.com/chef/ffi-yajl/blob/master/ext/ffi_yajl/ext/encoder/extconf.rb#L9
unfortunately my knowledge of Ruby is very limited and I don't know if 'include_path' should be defined and if it should then why it is not defined.
Thanks
This should help you.
Here are the steps:
sudo apt remove ruby
Install ruby https://tecadmin.net/install-ruby-latest-stable-centos/#
try gem install again
Source: https://github.com/chef/ffi-yajl/issues/91
I'm trying to install capybara, on my ruby 2.7.3 system, and it's failing.
I appear to not be able to look at the output and see the magic words Command 'qmake ' not available
my output:
gem install capybara-webkit
Building native extensions. This could take a while...
ERROR: Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
current directory: /var/home/user/.rvm/gems/ruby-2.7.3/gems/capybara-webkit-1.15.1
/var/home/user/.rvm/rubies/ruby-2.7.3/bin/ruby -I /var/home/user/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0 -r ./siteconf20210604-1512733-c8fw23.rb 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.
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=/var/home/user/.rvm/rubies/ruby-2.7.3/bin/$(RUBY_BASE_NAME)
--with-gl-dir
--without-gl-dir
--with-gl-include
--without-gl-include=${gl-dir}/include
--with-gl-lib
--without-gl-lib=${gl-dir}/lib
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
Command 'qmake ' not available
extconf failed, exit code 1
Gem files will remain installed in /var/home/user/.rvm/gems/ruby-2.7.3/gems/capybara-webkit-1.15.1 for inspection.
Results logged to /var/home/user/.rvm/gems/ruby-2.7.3/extensions/x86_64-linux/2.7.0/capybara-webkit-1.15.1/gem_make.out
I am trying to install Github Linguist ruby gem through terminal in Mac .
I don't have enough points to upload image so please bear with me.
This is error it is showing when I install it in terminal :-
bash-3.2# gem install github-linguist
Building native extensions. This could take a while...
ERROR: Error installing github-linguist:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20150321-444-15aw05d.rb extconf.rb
checking for gmake... no
checking for make... yes
checking for cmake... no
ERROR: CMake is required to build Rugged.
* 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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--use-system-libraries
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/rugged-0.22.1b1 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/rugged-0.22.1b1/gem_make.out
brew install cmake should do the trick
I know you are not asking how to manager Ruby's versions.
but starting to use RVM will help a lot.
On my Ubuntu 14.04 I installed Ruby 2.2.0 using RVM.
I have installed the "taglib" using following command sudo apt-get install libtag1-dev.
However when I try to install a gem I get the following error:
> gem install stream2tracks
Building native extensions. This could take a while...
ERROR: Error installing stream2tracks:
ERROR: Failed to build gem native extension.
/home/dash/.rvm/rubies/ruby-2.2.0-dev/bin/ruby -r ./siteconf20150207-2313-h67sa7.rb extconf.rb
checking for ruby.h... yes
checking for taglib/tag_c.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=/home/dash/.rvm/rubies/ruby-2.2.0-dev/bin/$(RUBY_BASE_NAME)
extconf failed, exit code 1
Gem files will remain installed in /home/dash/.rvm/gems/ruby-2.2.0-dev/gems/taglib2-0.1.5 for inspection.
You need to install libtagc0-dev to get TagLib's C header (the one the gem is checking for).
Am trying to install memcached gem in my windows 8.Am getting following error while executing the command gem install memcached
I already installed Devkit and using ruby1.9.3
C:\Users\aran>gem install memcached
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while.
..
ERROR: Error installing memcached:
ERROR: Failed to build gem native extension.
C:/ProgramData/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
checking for sasl/sasl.h... no
Please install SASL to continue. The package is called libsasl2-dev on Ubuntu an
d cyrus-sasl on Gentoo.
*** 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:/ProgramData/RailsInstaller/Ruby1.9.3/bin/ruby
Gem files will remain installed in C:/ProgramData/RailsInstaller/Ruby1.9.3/lib/r
uby/gems/1.9.1/gems/memcached-1.6.1 for inspection.
Results logged to C:/ProgramData/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/ge
ms/memcached-1.6.1/ext/gem_make.out
How can i rectify this error??
On Fedora, I installed cyrus-sasl-devel. There might be same or something equivalent on Windows too...give it a try..