rhc setup gives error `no such file dl/import` still - ruby

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

Related

Ruby on Windows: `ansi.rb` get_screen_size error: in `winsize': Bad file descriptor - <STDIN> (Errno::EBADF)

I'm trying to use fastlane on Windows, which is installed from Bundler -- which is installed by Ruby Gem. But while running, some internal error of Ruby seems blocked the execution.
First, I went to Ruby Installer and installed Ruby+Devkit 3.0.2-1 (x64); then, I installed the Bundler and Fastlane using gem command. Error below happened when I was trying to execute them -- which I believed was not related to Bundler nor Fastlane:
C:/Ruby30-x64/lib/ruby/3.0.0/reline/ansi.rb:157:in `winsize': Bad file descriptor - <STDIN> (Errno::EBADF)
from C:/Ruby30-x64/lib/ruby/3.0.0/reline/ansi.rb:157:in `get_screen_size'
from C:/Ruby30-x64/lib/ruby/3.0.0/reline.rb:168:in `get_screen_size'
from C:/Ruby30-x64/lib/ruby/3.0.0/forwardable.rb:238:in `get_screen_size'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/tty-screen-0.8.1/lib/tty/screen.rb:236:in `size_from_readline'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/tty-screen-0.8.1/lib/tty/screen.rb:66:in `size'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/tty-screen-0.8.1/lib/tty/screen.rb:76:in `width'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/fastlane-2.197.0/fastlane_core/lib/fastlane_core/print_table.rb:95:in `transform_output'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/fastlane-2.197.0/fastlane/lib/fastlane/plugins/plugin_manager.rb:335:in `print_plugin_information'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/fastlane-2.197.0/fastlane/lib/fastlane/plugins/plugin_manager.rb:316:in `load_plugins'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/fastlane-2.197.0/fastlane/lib/fastlane/commands_generator.rb:39:in `start'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/fastlane-2.197.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in `take_off'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/fastlane-2.197.0/bin/fastlane:23:in `<top (required)>'
from C:/Ruby30-x64/bin/fastlane:23:in `load'
from C:/Ruby30-x64/bin/fastlane:23:in `<main>'
I'm using Windows 10 home version 20H2.
Rebooting the computer doesn't solve the problem.
I tried googling the question, but it seems that problem hasn't be reported (or be answered). I don't know where I can report the bug either.
What can I do? Any help would be appreciated!
I had this same error when I tried running bundle exec fastlane in git bash.
I got it working by running it in powershell instead.

RubyMine debugger error

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-

Problems running rails 2.3.10 bundler `require': no such file to load -- rubygems (LoadError)

I have an app on Rails 2.3.10 on production; when I try to start with ruby script/server -p 3017 -e production -d it throws me the following error:
Rails requires RubyGems >= 1.3.2. Please install RubyGems and try again: http://rubygems.rubyforge.org
try installing passenger to start the project with but it generates another error:
/home/gmcms/.rvm/gems/ruby-1.8.7-p370#nick_backend/gems/bundler-1.3.5/lib/bundler/shared_helpers.rb:2:in `require': no such file to load -- rubygems (LoadError)
from /home/gmcms/.rvm/gems/ruby-1.8.7-p370#nick_backend/gems/bundler-1.3.5/lib/bundler/shared_helpers.rb:2
from /home/gmcms/.rvm/gems/ruby-1.8.7-p370#nick_backend/gems/bundler-1.3.5/lib/bundler/setup.rb:1:in `require'
from /home/gmcms/.rvm/gems/ruby-1.8.7-p370#nick_backend/gems/bundler-1.3.5/lib/bundler/setup.rb:1
I got this project from another developer, and he always started the project this way; before it didn't have a Gemfile, so I created a Gemfile where I defined the gems the project is using and then install everything with bundler adding the parameter --deployment:
bundle install --deployment
I've also followed the steps that are on the official website of bundler:
http://bundler.io/v1.3/rails23.html
But when I try to run the project the same way using ruby script/server it haves me the same error. I followed this threads but none of them worked for me:
http://docs.rubygems.org/read/chapter/15#page66
Rails "no such file to load -- rubygems (LoadError)"
no such file to load -- rubygems (LoadError)
What can I do? Thanks in advance.
Juan Trejo.
I have run into similar issues. Try running
rvm gemset use global && bundle

Issue installing Rubygems 2.0.3 (Ruby 2.0.0-p195) - No directory?

There I was thinking getting setup to build a RoR application would be easy. All I had to do was download Ruby, RubyGems and Rails. It's been 48 hours of headaches (rbenv can't seem to install the current version of Ruby so I had to repeat the process with RVM).
I can't install Rubygems either by running the setup file or through RVM. Here are the results:
"unknown:rubygems-2.0.3 aok617$ ruby setup.rb
/Users/aok617/rubygems-2.0.3/lib/rubygems/config_file.rb:318:in `read': Is a directory - /Users/aok617/.gemrc (Errno::EISDIR)
from /Users/aok617/rubygems-2.0.3/lib/rubygems/config_file.rb:318:in `load_file'
from /Users/aok617/rubygems-2.0.3/lib/rubygems/config_file.rb:191:in `initialize'
from /Users/aok617/rubygems-2.0.3/lib/rubygems/gem_runner.rb:66:in `new'
from /Users/aok617/rubygems-2.0.3/lib/rubygems/gem_runner.rb:66:in `do_configuration'
from /Users/aok617/rubygems-2.0.3/lib/rubygems/gem_runner.rb:46:in `run'
from setup.rb:45:in `'
unknown:rubygems-2.0.3 aok617$ "
And when I try to use RVM:
unknown:rubygems-2.0.3 aok617$ rvm install rubygems 2.0.3
Retrieving rubygems-2.0.3
Extracting rubygems-2.0.3 ...
Removing old Rubygems files...
Installing rubygems-2.0.3 for .
Error running 'env GEM_PATH=:#global GEM_HOME= /Users/aok617/.rvm/rubies//bin/ruby -d /Users/aok617/.rvm/src/rubygems-2.0.3/setup.rb',
please read /Users/aok617/.rvm/log/1372015627_rubygems.install.log
Installation of rubygems did not complete successfully.
mkdir: : No such file or directory
mkdir: : No such file or directory
unknown:rubygems-2.0.3 aok617$
The install log simply states:
[2013-06-23 20:13:14] /Users/aok617/.rvm/rubies//bin/ruby
env: /Users/aok617/.rvm/rubies//bin/ruby: No such file or directory
The common error seems to be that it is not a directory but I've followed two different sets of instructions. I don't see why the error keeps appearing.
Rbenv simple would not work installing Ruby 2.0.0. I believe this is because the gem path was not specified properly, however I have not found clear instructions for setting this up correctly. I would recommend uninstalling rbenv completely (system restore if necessary) and then performing a fresh install using RVM and Homebrew. Follow instructions on RVM website.

Rake failing to start

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.

Resources