i have Ruby 2.2 and i can't run any file .rb from command prompt each time i have same error:
C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- dl/import (LoadError)
from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-classic-4.2.0/lib/watir-classic/win32.rb:1:in `<top (required)>'
from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-classic-4.2.0/lib/watir-classic.rb:32:in `<top (required)>'
from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-5.0.0-x86-mingw32/lib/watir/loader.rb:41:in `load_driver'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-5.0.0-x86-mingw32/lib/watir/loader.rb:33:in `load_driver_for'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-5.0.0-x86-mingw32/lib/watir/loader.rb:14:in `start'
from test.rb:2:in `<main>'
what shall i do?
Try this:
gem install net-ssh -v 2.9.3.beta1
Related
(I'm using a MAC with High Sierra 10.13.10)
HomeBrew isn't working. I get errors trying to use it.
For example:
$ brew --version
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mach (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/Library/Homebrew/extend/pathname.rb:2:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/Library/Homebrew/global.rb:3:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/Library/brew.rb:15:in `<main>'
C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- debase_internals (LoadError)
from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/debase-0.2.2.beta6/lib/debase.rb:4:in `<top (required)>'
from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:8:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide:8:in `require_relative'
from C:/Ruby22/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>'
How to fix the above errors?
It is better to use byebug instead of debugger when you are using ruby version above 1.9.3 .
After upgrading to OS X Yosemite, attempting to install pods gives me this error.
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- xcodeproj/prebuilt/universal.x86_64-darwin14-2.0.0/xcodeproj_ext (LoadError)
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.16.1/lib/xcodeproj/ext.rb:6:in `rescue in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.16.1/lib/xcodeproj/ext.rb:3:in `<top (required)>'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.16.1/lib/xcodeproj.rb:30:in `<top (required)>'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.32.1/lib/cocoapods.rb:2:in `<top (required)>'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.32.1/bin/pod:32:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'
I have tried uninstalling cocoapods and installing it with no luck. I get this error upon trying to install cocoapods.
ERROR: While executing gem ... (Errno::EEXIST)
File exists # dir_s_mkdir - /usr/local/Cellar/ruby/2.1.2/lib/ruby/gems
In xcode-preferences-locations I am not given an option to change Command Line tools to anything lower than Xcode 6.3...
Any ideas how to fix this?
I tried the following command rhc setup and following message is displayed
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- net/ssh (LoadError)
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/ssh_helpers.rb:18:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/wizard.rb:72:in `<class:Wizard>'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/wizard.rb:6:in `<module:RHC>'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/wizard.rb:5:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/commands/base.rb:4:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/commands/app.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/commands.rb:139:in `block in load'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/commands.rb:138:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/commands.rb:138:in `load'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/cli.rb:35:in `start'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/bin/rhc:18:in `<top (required)>'
from /usr/local/bin/rhc:23:in `load'
from /usr/local/bin/rhc:23:in `<main>'
What is the problem?
periodically updating to the latest version of rhc is a good idea as well:
sudo gem update rhc
It should pull net-ssh in as a dependency.
Updating net-ssh to 2.9.3.beta1, as cremno suggested in this comment, resolved my problem and a few other people as well.
$ gem install net-ssh -v 2.9.3.beta1
this answer is from: rhc setup gives error `no such file dl/import`
This below code did the trick
sudo gem install net-ssh
➜ henryyan#hy-hp ~/work/blog/henryyan.github.com git:(master) ✗ ruby -rubygems -e 'require "jekyll/migrators/wordpress"; Jekyll::WordPress.process("wordpress", "root", "root")'
<internal:lib/rubygems/custom_require>:29:in `require': LoadError: no such file to load -- mysql (Sequel::AdapterNotFound)
from <internal:lib/rubygems/custom_require>:29:in `require'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/adapters/mysql.rb:4:in `rescue in <top (required)>'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/adapters/mysql.rb:1:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:312:in `block in tsk_require'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:94:in `block in check_requiring_thread'
from <internal:prelude>:10:in `synchronize'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:91:in `check_requiring_thread'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:312:in `tsk_require'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/database/connecting.rb:25:in `adapter_class'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/database/connecting.rb:63:in `connect'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:141:in `connect'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:345:in `adapter_method'
from /var/lib/gems/1.9.1/gems/sequel-3.33.0/lib/sequel/core.rb:352:in `mysql'
from /var/lib/gems/1.9.1/gems/jekyll-0.11.2/lib/jekyll/migrators/wordpress.rb:15:in `process'
from -e:1:in `<main>'
You need to install the mysql gem:
gem install mysql
See the same error on this other SO answer: Wordpress to Jekyll script throwing error