rhc setup gives error `no such file dl/import` - 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 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)
Full stack trace:
C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- dl/import (LoadError)
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/pageant.rb:1:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/agent/socket.rb:5:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/agent.rb:22:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/key_manager.rb:4:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/session.rb:4:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh.rb:11:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/ssh_helpers.rb:18:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/wizard.rb:77:in `<class:Wizard>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/wizard.rb:7:in `<module:RHC>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/wizard.rb:6:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/commands/base.rb:4:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/commands/account.rb:2:in `<module:Commands>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/commands/account.rb:1:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/commands.rb:189:in `block in load'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/commands.rb:188:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/commands.rb:188:in `load'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/cli.rb:36:in `start'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/bin/rhc:20:in `<top (required)>'
from C:/Ruby22-x64/bin/rhc:23:in `load'
from C:/Ruby22-x64/bin/rhc:23:in `<main>'
I found same problem: https://groups.google.com/forum/#!topic/supmua/hPyTTamhTyc
It's suggest to replace DL with Fiddle.
How I can get working rhc?

Updating net-ssh to 2.9.3.beta1, as cremno suggested in this comment, resolved my problem.
gem install net-ssh -v 2.9.3.beta1
Before that, I tried gem install net-ssh, but it didn't help.

I ran into this problem when I used the latest version of Ruby (currently 2.2.1) as stated on the OpenShift setup instructions. I fixed it by:
Installing Ruby 1.9.3
Re-running "gem install rhc"
After that, I was able to run "rhc setup" without any issue.

If you are running Windows 10 Pro x64, try installing Ruby 2.1.8 (x64) with Git Version 2.7.0. This will surely allow you to run rhc setup as it did happened with me. Earlier I had a problem running & installing latest version of Ruby 2.2.4 (x64) but when I downgraded to ruby version 2.1.8 (x64) I was able to run rhc setup and configure OpenShift client toolson Windows. See the image for Ruby version I'm using - ruby 2.1.8p440 (2015-12-16 revision 53160) [x64-mingw32]
Read here for getting started to OpenShift client tools on windows.

Use the RHC tested Ruby version instead of the latest. As of today it is 1.9.3-p194

Try using/installing a lower version of ruby after uninstalling the 2,2,0 because some windows version conflict with ruby version you are using. I tried 2.2.3 and then lowered to 2.2.0 and it worked for me.

I ran into this same error, and none of the solutions worked for me. In a last attempt, I installed the Ruby 1.9.3-p551 version and the rhc setup went smoothly. I use a Windows 10 machine.

I am running Windows 10 Pro x64. I installed Ruby 2.1.8 (x64) with Git Version 2.7.2. Rhc was installed successfully. However, "rhc snapshot save ..." command had problem with net-ssh. However, after restarting windows 10 the errors was gone.
Remember to try reboot your windows.

Related

Can't install Shopify-CLI on Window 11: Could not determine OS from platform x64-mingw-ucrt

I followed the instructions on the shopify website and everything seemed to install correctly...until I tried to confirm it with shopify version
Here's the cmd output:
C:\WINDOWS\system32>gem install shopify-cli
Fetching shopify-cli-2.7.4.gem
Successfully installed shopify-cli-2.7.4
Parsing documentation for shopify-cli-2.7.4
Installing ri documentation for shopify-cli-2.7.4
Done installing documentation for shopify-cli after 3 seconds
1 gem installed
C:\WINDOWS\system32>shopify version
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/vendor/deps/cli-ui/lib/cli/ui/os.rb:15:in `current': Could not determine OS from platform x64-mingw-ucrt (RuntimeError)
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/vendor/deps/cli-ui/lib/cli/ui/spinner.rb:13:in `<module:Spinner>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/vendor/deps/cli-ui/lib/cli/ui/spinner.rb:6:in `<module:UI>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/vendor/deps/cli-ui/lib/cli/ui/spinner.rb:5:in `<module:CLI>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/vendor/deps/cli-ui/lib/cli/ui/spinner.rb:4:in `<top (required)>'
from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/bin/shopify:9:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/vendor/deps/cli-ui/lib/cli/ui.rb:19:in `<module:UI>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/vendor/deps/cli-ui/lib/cli/ui.rb:2:in `<module:CLI>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/vendor/deps/cli-ui/lib/cli/ui.rb:1:in `<top (required)>'
from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/bin/shopify:9:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/lib/shopify_cli.rb:24:in `<top (required)>'
from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/bin/shopify:9:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/bin/load_shopify.rb:18:in `<top (required)>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/bin/shopify:32:in `require_relative'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/bin/shopify:32:in `<top (required)>'
from C:/Ruby31-x64/bin/shopify:25:in `load'
from C:/Ruby31-x64/bin/shopify:25:in `<main>'
Any help is greatly appreciated
Seems like a bug. You should report it on their Github page, but in the meantime you can fix it yourself:
In your editor open the file:
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/shopify-cli-2.7.4/vendor/deps/cli-ui/lib/cli/ui/os.rb
Find the line (around line 12) that says:
when /mingw32/
Windows
Change it to:
when /mingw/
Windows
And now try again.
This issue has been fixed in version 2.10.2.

Thin can't find pg_ext

I'm trying to run the command
thin -R lat.ru start
in the directory 50web\servers\dev (lat.ru is part of the open source project 50web).
I get the following error:
D:\dev\derek\50web\servers\dev>thin -R lat.ru start
C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': ca
nnot load such file -- 2.1/pg_ext (LoadError)
from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
from C:/Ruby21/lib/ruby/gems/2.1.0/gems/pg-0.18.4/lib/pg.rb:14:in `rescu
e in <top (required)>'
from C:/Ruby21/lib/ruby/gems/2.1.0/gems/pg-0.18.4/lib/pg.rb:3:in `<top (
required)>'
from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in
`require'
from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in
`rescue in require'
from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in
`require'
from C:/Ruby21/lib/ruby/site_ruby/2.1.0/getdb.rb:11:in `<top (required)>
'
from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
from D:/dev/derek/50web/routes/lat.rb:2:in `<top (required)>'
from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
from C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
from lat.ru:3:in `block in <main>'
from C:/Ruby21/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:5
5:in `instance_eval'
from C:/Ruby21/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:5
5:in `initialize'
from lat.ru:1:in `new'
from lat.ru:1:in `<main>'
from C:/Ruby21/lib/ruby/gems/2.1.0/gems/thin-1.6.4/lib/rack/adapter/load
er.rb:33:in `eval'
from C:/Ruby21/lib/ruby/gems/2.1.0/gems/thin-1.6.4/lib/rack/adapter/load
er.rb:33:in `load'
from C:/Ruby21/lib/ruby/gems/2.1.0/gems/thin-1.6.4/lib/thin/controllers/
controller.rb:182:in `load_rackup_config'
from C:/Ruby21/lib/ruby/gems/2.1.0/gems/thin-1.6.4/lib/thin/controllers/
controller.rb:72:in `start'
from C:/Ruby21/lib/ruby/gems/2.1.0/gems/thin-1.6.4/lib/thin/runner.rb:20
0:in `run_command'
from C:/Ruby21/lib/ruby/gems/2.1.0/gems/thin-1.6.4/lib/thin/runner.rb:15
6:in `run!'
from C:/Ruby21/lib/ruby/gems/2.1.0/gems/thin-1.6.4/bin/thin:6:in `<top (
required)>'
from C:/Ruby21/bin/thin:23:in `load'
from C:/Ruby21/bin/thin:23:in `<main>'
I'm using pg 0.18.4, which seems like the most recent version:
D:\dev\derek\50web\servers\dev>gem list pg
*** LOCAL GEMS ***
pg (0.18.4)
D:\dev\derek\50web\servers\dev>gem update pg
Updating installed gems
Nothing to update
Ruby version is 2.1.7p400 (2015-08-18 revision 51632) [i386-mingw32].
How can I fix this error?
Update 1 (02.02.2016 08:08 MSK):
I've to run the same project on a different machine:
C:\usr\dp\dev\derek\50web\servers\dev>ruby lat.ru
C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- 2.2/pg_ext (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/pg-0.18.4/lib/pg.rb:14:in `rescue in <top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/pg-0.18.4/lib/pg.rb:3:in `<top (required)>'
from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'
I noticed that Ruby seems to look for the pg_ext file in 2.2/pg_ext directory, whereas in reality it's installed in the C:\Ruby22\lib\ruby\gems\2.2.0\gems\pg-0.18.4\lib directory.
It looks like installation of C-extension part of pg gem is broken.
make sure postgresql development libraries are installed
reinstall pg gem and see if there are no error messages
Reinstallation with -f force flag, or better gem uninstall and gem install anew.
I fixed the error by uninstalling the pg gem and re-installing it using gem install pg --pre command. It's necessary because of a bug, which hasn't been fixed in the release version yet.

trying to run command rails server (ruby on rails)

im trying to get started with rails. I have made a rails project and now im trying to start the server but get this.
C:\Users\Home\Documents\Sites\simple_cms>rails server
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2/mysql2.rb:2:in `require': cannot load such file -- mysql2/2.2/mysql2 (LoadError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2/mysql2.rb:2:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2.rb:31:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2.rb:31:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:76:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:72:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:72:in `block in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:61:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:61:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:134:in `require'
from C:/Users/Home/Documents/Sites/simple_cms/config/application.rb:7:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
my gemfile has gem 'mysql2', '~> 0.3.18'
windows 7
ruby version 2.2.1
rails 4.2.1
mySql server version 5.6.24
Edit:
Couldn't find a solution that worked for me so i installed a different version of rails and it worked out.
Make sure you have installed mysql2 gem using bundle install and that bundle install has returned successful installation.
#James, This issue has been already raised so follow these links and hope this may help you.
1) Error "...cannot load such file -- mysql2/2.0/mysql2 (LoadError)". On Windows XP with Ruby 2.0.0
2) Ruby on Rails - cannot load such file -- mysql2/2.2/mysql2 (LoadError)
3) https://github.com/bundler/bundler/issues/3456
Try to change
gem 'mysql2', '~> 0.3.18'
to
gem 'mysql2', '~> 0.3.11'
I think that maximum compatible version with Windows is 0.3.11. Then run again bundle install

Symbol not found when using ruby gem berkshelf

I have been having general issues with berkshelf, namely the dependancy solver problem that you can read more about here
Now that issue has been solved I've just tried to do a bundle install/update and a berks install to try out the new dependancy solver but I'm getting a strange error when i do a berks install:
➜ deployment git:(master) ✗ berks install
/usr/local/rvm/gems/ruby-1.9.3-p484#global/gems/ffi-1.9.3/lib/ffi/library.rb:133:in `block in ffi_lib': Could not open library '/usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_gecode.bundle': dlopen(/usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_gecode.bundle, 5): Symbol not found: __ZN6Gecode16ValBranchOptions3defE (LoadError)
Referenced from: /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_gecode.bundle
Expected in: flat namespace
in /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_gecode.bundle
from /usr/local/rvm/gems/ruby-1.9.3-p484#global/gems/ffi-1.9.3/lib/ffi/library.rb:100:in `map'
from /usr/local/rvm/gems/ruby-1.9.3-p484#global/gems/ffi-1.9.3/lib/ffi/library.rb:100:in `ffi_lib'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector/dep_gecode.rb:33:in `<module:Dep_gecode>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector/dep_gecode.rb:21:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector/gecode_wrapper.rb:21:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector/gecode_wrapper.rb:21:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector/dependency_graph.rb:21:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector/dependency_graph.rb:21:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector/selector.rb:21:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector/selector.rb:21:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector.rb:22:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector.rb:22:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/solve-1.0.0.rc1/lib/solve/solver.rb:1:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/solve-1.0.0.rc1/lib/solve/solver.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/solve-1.0.0.rc1/lib/solve.rb:10:in `require_relative'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/solve-1.0.0.rc1/lib/solve.rb:10:in `<module:Solve>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/solve-1.0.0.rc1/lib/solve.rb:3:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/berkshelf-7060813e4887/lib/berkshelf.rb:8:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/berkshelf-7060813e4887/lib/berkshelf.rb:8:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/berkshelf-7060813e4887/lib/berkshelf/cli.rb:1:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/berkshelf-7060813e4887/lib/berkshelf/cli.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/berkshelf-7060813e4887/bin/berks:3:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/berkshelf-7060813e4887/bin/berks:3:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bin/berks:23:in `load'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bin/berks:23:in `<main>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `eval'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `<main>'
Now I don't know very much about Ruby but I have some experience with C++ and I will never forget these sorts of library linking issues. Only problem is I literally have no idea what I'm supposed to do with this!?
I'm on a mac so I've installed the Gecode dependancy using homebrew. I've tried uninstalling it and re-installing it a few times, I even tried following this article but it didn't seem to change anything.
Any advice would be much appreciated, thanks!
I was seeing the same symptoms, and did a little bit of research onto it. Got it to work by switching gecode versions:
brew switch gecode 3.7.3
Then uninstalled the offending gems:
gem uninstall berkshelf
gem uninstall solve
gem uninstall dep_selector
And finally reinstalling bershelf:
gem install berkshelf

Error while launching knife configure command

I tried to getting started with chef so I installed the chef gem on my laptop ( OS : OSX 10.8) with ruby 2.0.0-p0 but when I try to "knife configure " I juste get this message :
/Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:106:in `require': cannot load such file -- rubygems/format (LoadError)
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:106:in `require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef/provider/package/rubygems.rb:34:in `<top (required)>'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef/providers.rb:60:in `<top (required)>'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef.rb:25:in `<top (required)>'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:58:in `require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chefspec-0.9.0/lib/chefspec.rb:1:in `<top (required)>'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chefspec-0.9.0/lib/chef/knife/cookbook_create_specs.rb:1:in `<top (required)>'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef/knife/core/subcommand_loader.rb:37:in `load'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef/knife/core/subcommand_loader.rb:37:in `block in load_commands'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef/knife/core/subcommand_loader.rb:37:in `each'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef/knife/core/subcommand_loader.rb:37:in `load_commands'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef/knife.rb:119:in `load_commands'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef/knife.rb:167:in `run'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/lib/chef/application/knife.rb:123:in `run'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/chef-11.4.0/bin/knife:25:in `<top (required)>'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/bin/knife:23:in `load'
from /Users/maximeheckel/.rbenv/versions/2.0.0-p0/bin/knife:23:in `<main>'
The accepted answer isn't entirely correct. The problem isn't ruby 2.0, it's rubygems 2.x. If you run gem update --system 1.8.25 to downgrade to a pre 2.x rubygems, everything works like a champ.
NOTE: I haven't had to do this locally, but this is how I've gotten knife bootstrap to work against my remote servers. I'm running ruby 2.0 on my local machine with latest rubygems and chef 11.4.4 and everything else seems to work properly.
According to this issue at opscode it was a bug. It has been fixed in chef 11.6.0.
The problem is that only chef 11.4.4 is on rubygems as of today (2013-06-23)
So, either use 1.9.x or rubygems 1.8.25 will work for now, until the next version of chef comes out. It may be possible to build it from https://github.com/opscode/chef.git
I ended up patching my chef 11.4.4 lib/chef/provider/package/rubygems.rb with this file: https://github.com/opscode/chef/blob/d6748efde62502ab6f5d97052f46ca00352497ef/lib/chef/provider/package/rubygems.rb
I had similar errors trying to use Chef (10.24 and 11.4) with Ruby 2.0 - so I assume Chef is not yet Ruby 2.0 compatible :(
The accepted answer is great if you're using the system ruby (/usr/bin/ruby, for example), but it didn't work for me because I'm using RVM. I found an equivalent solution in case you're using RVM:
rvm rubygems 1.8.25 will install rubygems version 1.8.25 for your RVM ruby.

Resources