i'm using RubyMine 6.3 buth I have some problems with debugger
C:\Ruby200\bin\ruby.exe -e
$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)
C:/Ruby200/lib/ruby/gems/2.0.0/gems/ruby-debug-ide-0.4.23.beta1/bin/rdebug-ide
--disable-int-handler --port 49883 --dispatcher-port 49884 -- C:/Ruby200/Projekty/123/test
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require': cannot load such file -- debase_internals (LoadError) from
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require' from
C:/Ruby200/lib/ruby/gems/2.0.0/gems/debase-0.0.9/lib/debase.rb:4:in
<top (required)>' from
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require' from
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require' from
C:/Ruby200/lib/ruby/gems/2.0.0/gems/ruby-debug-ide-0.4.23.beta1/lib/ruby-debug-ide.rb:8:in
' from
C:/Ruby200/lib/ruby/gems/2.0.0/gems/ruby-debug-ide-0.4.23.beta1/bin/rdebug-ide:8:in
require_relative' from
C:/Ruby200/lib/ruby/gems/2.0.0/gems/ruby-debug-ide-0.4.23.beta1/bin/rdebug-ide:8:in
' from -e:1:in load' from -e:1:in'
Process finished with exit code 1
But when use Ruby Interactive Console, all is working. When I use Komodo IDE all is fine.
I fixed my issue by installing debase manually from the terminal, not from the one bundled with rubymine, try it
gem install debase
PS: I was using ruby 1.9.3
Adding the following to my Gemfile made debugging and rails commands work (versions: Rubymine 7.0.4, ruby 2.3.1 and rails 4.2.6):
group :development do
gem 'ruby-debug-ide', '0.4.24'
gem 'debase', '0.2.1'
end
Just spent 6 hours working through this, and just in case this helps others, here is what I did:
Upgraded to latest version of RubyMine (downloaded 7.0 from JetBrains site)
Upgraded to Ruby 2.1.2
Opened RubyMine > File > Default Settings > Ruby SDK & Gems > Selected ruby-2.1.2 > Clicked '+' on right hand side > Installed cucumber and calabash-cucumber
RubyMine > Run > Edit Configurations > changed the SDK to ruby-2.1.2
And it worked. Hopefully this might help others new to Calabash / Ruby / RubyMine
Martins-MacBook-Pro:~ martincleaver$ sudo gem install debase -v 0.0.9
Password:
ERROR: Error installing debase:
ERROR: Failed to build gem native extension.
checking for vm_core.h... no
No source for ruby-2.0.0-p648 provided with debugger-ruby_core_source gem.
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details.
$ more /Library/Ruby/Gems/2.0.0/gems/debase-0.0.9/ext/gem_make.out
checking for vm_core.h... no
Makefile creation failed
Check the mkmf.log file for more details
$ more /Library/Ruby/Gems/2.0.0/gems/debase-0.0.9/ext/mkmf.log
have_header: checking for vm_core.h... -------------------- no
conftest.c:3:10: fatal error: 'vm_core.h' file not found
#include <vm_core.h>
--------------------
https://github.com/denofevil/debase/issues/9 tracks the issue from the gem standpoint. It's the best place to discuss the matter.
That said, iheggie's answer at https://stackoverflow.com/a/37086441/722034 worked for me.
Updating Rubymine to the latest version (and waiting for reindexing to finish, which can be quite long) helped fix some problems cf https://intellij-support.jetbrains.com/hc/en-us/community/posts/360009522340-Unable-to-use-debugger-debase-0-3-0-beta34-install-error-
Related
I'm using my work laptop to contribute to a non-work open-source project. At work we use rbenv to manage Ruby versions, but the open-source project appears to expect gem dependencies to be located in the system Ruby install folder. So when I try to run certain of the project's commands, I'm running into missing gem errors.
The project is Homebrew, and the command I'm running is brew style. When I run the command in my local, I get the following:
Ignoring rainbow-2.2.2 because its extensions are not built. Try: gem pristine rainbow --version 2.2.2
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- rainbow (LoadError)
from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/richie.thomas/.gem/ruby/2.3.0/gems/rubocop-0.50.0/lib/rubocop.rb:4:in `<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/richie.thomas/.gem/ruby/2.3.0/gems/rubocop-0.50.0/bin/rubocop:6:in `<top (required)>'
from /Users/richie.thomas/.gem/ruby/2.3.0/bin/rubocop:22:in `load'
from /Users/richie.thomas/.gem/ruby/2.3.0/bin/rubocop:22:in `<main>'
Running gem environment returns the following:
RubyGems Environment:
- RUBYGEMS VERSION: 2.6.10
- RUBY VERSION: 2.3.3 (2016-11-21 patchlevel 222) [x86_64-darwin15]
- INSTALLATION DIRECTORY: /Users/richie.thomas/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0
- USER INSTALLATION DIRECTORY: /Users/richie.thomas/.gem/ruby/2.3.0
- RUBY EXECUTABLE: /Users/richie.thomas/.rbenv/versions/2.3.3/bin/ruby
- EXECUTABLE DIRECTORY: /Users/richie.thomas/.rbenv/versions/2.3.3/bin
- SPEC CACHE DIRECTORY: /Users/richie.thomas/.gem/specs
....
I've been advised by other contributors that the easiest path forward would be to disable or uninstall rbenv in order to run the command. I'd really like to avoid uninstalling and reinstalling rbenv every time I want to run this command, but there is nothing in the rbenv documentation that mentions this.
Is there any one-time command I can run, or any configuration setting I can change, so that I can do what I need to do?
I re-ran gem environment and noticed that the following environment variables were defined:
INSTALLATION DIRECTORY: /Users/richie.thomas/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0
USER INSTALLATION DIRECTORY: /Users/richie.thomas/.gem/ruby/2.3.0
The value of INSTALLATION DIRECTORY is what I expected to be used to run the command, and I noticed the value of USER INSTALLATION DIRECTORY is what showed up in the error stacktrace.
Since I was unable to figure out how my machine was determining which variable to use, I simply renamed ~/.gem/ to ~/.gem2/ and re-ran the brew style command I originally wanted. This was successful!
I cannot get debug mode working in RubyMine. Below is what I did to install it all. This is followed by the error details and my setup
Any advice please
A Download and Install Ruby
1.Download Ruby 2.2.6 - http://rubyinstaller.org/downloads/
2.Install Ruby 2.2.6 to C:\Ruby
B Download Ruby Dev kit
3.Return to http://rubyinstaller.org/downloads/
4.Under development click on "https://dl.bintray.com/oneclick/rubyinstaller/DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe"
5.Create Folder C:\Ruby\DevKit
6.Unzip "DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe" into C:\Ruby\DevKit
8.Go to folder C:\Ruby\DevKit , Now press Shift then right click "Open command window here"
9.Type "ruby dk.rb init" in command prompt and hit enter (c:\DevKit>ruby dk.rb init)
10.Type "ruby dk.rb install" in command prompt and hit enter (c:\DevKit>ruby dk.rb install)
C Install RubyGems
11.Open command prompt and type the following commands and hit enter every time
c:\gem install bundler
Then navigate to your project folder where the Gemfile located and run command 'bundle install'
D Download and Install Ruby Mine
13.Open http://www.jetbrains.com/ruby/download/
14.Click on 30 days Trial "Download Now"
15.Now Install Ruby Mine
From this point I can load projects and run projects but when I try to debug the
same project I get issues.
The message is Test framework quit unexpectedly
C:\Ruby\bin\ruby.exe -EUTF-8 -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:/Ruby/lib/ruby/gems/2.2.0/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide --disable-int-handler --evaluation-timeout 10 --rubymine-protocol-extensions --port 62718 --host 0.0.0.0 --dispatcher-port 62719 -- C:\Ruby\bin/cucumber C:/git/wiggle-automation/features/checkout.feature --format Teamcity::Cucumber::Formatter --expand --color -r features
Testing started at 15:58 ...
C:/Ruby/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- debase_internals (LoadError)
from C:/Ruby/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby/lib/ruby/gems/2.2.0/gems/debase-0.2.2.beta10/lib/debase.rb:4:in `<top (required)>'
from C:/Ruby/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby/lib/ruby/gems/2.2.0/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:8:in `<top (required)>'
from C:/Ruby/lib/ruby/gems/2.2.0/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide:8:in `require_relative'
from C:/Ruby/lib/ruby/gems/2.2.0/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide:8:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1
So with this in mind I try to install debase – gem install debase
And I get this
Building native extensions. This could take a while...
The system cannot find the path specified.
ERROR: Error installing debase:
ERROR: Failed to build gem native extension.
C:/Ruby/bin/ruby.exe -r ./siteconf20170726-16784-15t9wif.rb extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
checking for vm_core.h... yes
creating Makefile
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby/lib/ruby/gems/2.2.0/gems/debase-0.2.1 for inspection.
Results logged to C:/Ruby/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/debase-0.2.1/gem_make.out
So I look at the gem_make.out file as above and I see this
C:/Ruby/bin/ruby.exe -r ./siteconf20170726-21048-1y9auxw.rb extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
checking for vm_core.h... yes
creating Makefile
extconf failed, exit code 1
Can anyone explain what is happening please.
I am using Windows 7 and Ruby 2.2.6p396
OK got this working now.
I opened the Command Prompt as Administrator and then executed the following
c:\gem install ruby-debug-ide
c:\gem install debase
This time they both executed with no error.
I then restarted RubyMine and now I can run in debug mode.
Happy days....
I'm installing openshift client tools as described: https://developers.openshift.com/en/getting-started-windows.html#client-tools. On step 'Setting up Your Machine' I got an error.
rhc setup
C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
`require' : cannot load such file -- dl/import (LoadError)
The solution the problem is here but it's not working for me, even after I installed the gem and run
rhc setup
I'm still getting the same errors. What am I doing wrong? I downloaded Ruby 2.2.3 (x64) and I'm on windows 7.
install Ruby 2.0.0-p647 (x64) and not the later versions. suggested by fat fantasma in the comments
Try this in the cmd.
gem install net-ssh -v 2.9.3.beta1
I'm trying to get the Ruby gem "Nokogiri" running on a Solaris machine where I don't have root priviledges. What I've done so far:
I've build my own ruby version (1.9.2p180) in my home directory
tried to install nokogiri with "gem install nokogiri"
The gem install then throwed this error:
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/home/bender/ruby/bin/ruby extconf.rb
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... no
-----
libiconv is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
So I downloaded and build the libiconv in /home/myuser/work/libiconv
$ ls /home/myuser/work/libiconv/
bin build include lib share
And passed the locations as arguments for nokogiri:
gem install nokogiri -- --with-iconv-dir=/home/myuser/work/libiconv --with-iconv-include=/home/myuser/work/libiconv/include --with-iconv-lib=/home/myuser/work/libiconv/lib
Now the gem builds and no errors are displayed. The problem is, when I now try to use it, e.g. in irb it somehow fails to load:
require 'nokogiri'
LoadError: ld.so.1: ruby: fatal: libiconv.so.2: open failed: No such file or directory - /home/myuser/ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/nokogiri.so
from /home/myuser/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/myuser/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/myuser/ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri.rb:13:in `<top (required)>'
from /home/myuser/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:57:in `require'
from /home/myuser/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:57:in `rescue in require'
from /home/myuser/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from (irb):1
from /home/myuser/ruby/bin/irb:12:in `<main>'
But when I look for the file which should be missing it is there and also readable/executable:
ll /home/myuser/ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.4/lib/nokogiri/
total 66
...
-rwxr-xr-x 1 myuser group 370552 Jun 6 22:53 nokogiri.so
...
Ok, and that is where I'm stuck.. the file is there but can't be opened? I tried to rebuild the libiconv which had no effect. Nokogiri doesn't throw any error that the build process fails. So I don't know how to solve this and google could't give me answers either. I hope somebody here can give me some hints.
/edit
I googled around some more and found this post where somebody uses ldd to show dependencies. When I do the same for nokogiri it says:
ldd /home/myuser/ruby/bin/nokogiri
ldd: /home/myuser/ruby/bin/nokogiri: unsupported or unknown file type
I guess this is because its a ruby file but in case it is relevant I want to mention it.
If you're using GNU binutils, then try to set
LDFLAGS="-Wl,-rpath /home/myuser/work/libiconv/lib"
if it's a Solaris linker, then it's something like -X, I don't really remember. Just check the man page of ld for runpath settings. It'll allow the run-time linker to find the .so.
If you're going to build your own sandbox, why not use RVM to do all the heavy lifting? Its purpose in life is to create a user sandbox in ~/.rvm, build and manage the Ruby versions you want to run and the gemsets associated with your projects.
If you decide to go that path, which I recommend highly, be sure to follow the single-user installation directions on the linked page, to add the appropriate string to your ~/.bash_profile or ~/.bashrc if you you don't use a *profile file, and follow the recommendations RVM outputs when you run rvm notes.
I have it installed on several Centos, Ubuntu and Mac OS boxes where I do development, and think it's great.
I'm having trouble understanding the following error with Ruby's Rake.
C:\>gem install rake
Successfully installed rake-0.8.7
1 gem installed
Installing ri documentation for rake-0.8.7...
Installing RDoc documentation for rake-0.8.7...
C:\>rake
C:/Ruby192/lib/ruby/1.9.1/rubygems.rb:340:in `bin_path': can't find executable r
ake for rake-0.8.7 (Gem::Exception)
from C:/Ruby192/bin/rake:19:in `<main>'
Running Ruby 1.9.2 for Windows.
Edit: Installing from source yields:
C:\Documents and Settings\XPherior\Desktop\rake-0.8.7\rake-0.8.7>ruby install.rb
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load --
ftools (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from install.rb:3:in `<main>'
The second error, where you have installed into C:\Documenets And Settings\ is occurring because you cannot install ruby into a folder with a space in the path. It should be installed into c:\Ruby\ c:\Ruby#.#.#\ if you want the version # in the path, or something along those lines.
for the first error: there is a bug in the rubyinstaller.org version of ruby 1.9.2, which is causing this by running "gem install rake".
you can read about the error you're getting, here: http://redmine.ruby-lang.org/issues/show/3677
there are a couple of ways to fix this error:
re-install ruby v1.9.2 and don't run "gem install rake". rake v0.8.7 is built into the ruby v1.9.2 installation, so you don't need to re-install it.
if you do want to manually install it, you can delete the ruby.gempspec file from your ruby installation. this file is located at (rubyinstalldir)\lib\ruby\gems\1.9.1\specifications
either of these options will fix the problem for you.
i'm not sure which is "better" off-hand... it may be necessary to delete the gemspec file and reinstall rake, to support updates and new versions in the future. i'm not sure, though. we'll find out once rake is updated and we need to install a new version. or, perhaps, the issue will be fixed in the ruby installation by then, and we'll just need to update our ruby install.
I've run into your both errors.
For the first one. Try the solution post at here http://betterlogic.com/roger/2010/11/ruby-1-9-2-rake-woe/.
And for the second error, it's causes by a library update by the ruby 1.9. From the Programming Ruby 1.9, "ftools have been removed (and replaced by fileutils)." I'm not pretty sure but at least that's an explanation.