Code Monkey home page Code Monkey logo

Comments (30)

MikeMcQuaid avatar MikeMcQuaid commented on September 27, 2024

Same here. If there's a patch/workaround I'll apply it to the Homebrew formula.

from rbenv-bundler.

kenips avatar kenips commented on September 27, 2024

Reinstalling rbenv-bundler seems to have fixed the issue. @MikeMcQuaid can you confirm?

from rbenv-bundler.

MikeMcQuaid avatar MikeMcQuaid commented on September 27, 2024

Doesn't seem to for me; I get an infinite loop where it says my Ruby version isn't installed (it is). Wonder if the problem is that I've installed rbenv and rbenv-bundler from Homebrew?

from rbenv-bundler.

kenips avatar kenips commented on September 27, 2024

Actually I can reproduce yours as well - I have both installed using homebrew too. Somehow I thought it worked. I guess not. It actually spins some rehash processes that never terminate. For now I guess best is to disable rbenv bundler off or uninstall.

from rbenv-bundler.

carsomyr avatar carsomyr commented on September 27, 2024

All, I have some questions:

  1. Was it working for 0.3.0?
  2. What happens if you disable Homebrew and install rbenv into ~/.rbenv and clone in rbenv-bundler?
  3. Are you sure that the previous versions of rbenv and rbenv-bundler have been cleaned thoroughly? I still remember losing 2 hours of my life helping a coworker who thought he had removed the Homebrew-based rbenv, when in reality it left debris in /usr/local/share.
  4. Please make sure that you remove all metadata files in ${rbenv_bundler_root}/share/rbenv/bundler.

from rbenv-bundler.

MikeMcQuaid avatar MikeMcQuaid commented on September 27, 2024

@carsomyr Some answers:

  1. Yes.
    2, 3, 4. I'll give it a try and post back here.

from rbenv-bundler.

MikeMcQuaid avatar MikeMcQuaid commented on September 27, 2024

Also I've commit access to Homebrew so if rbenv and rbenv-bundler are doing anything odd I can fix that.

from rbenv-bundler.

carsomyr avatar carsomyr commented on September 27, 2024

All, I just tried this in a clean Homebrew environment for myself, and everything seems to be in order. I'm closing the issue for now; please make sure that you do item 4.

from rbenv-bundler.

carsomyr avatar carsomyr commented on September 27, 2024

Never mind, I backtrack, as I am getting the error, too.

from rbenv-bundler.

carsomyr avatar carsomyr commented on September 27, 2024

Also, are you guys sure that rbenv rehash results in processes that never terminate?

from rbenv-bundler.

kenips avatar kenips commented on September 27, 2024

@carsomyr no, not 100%, let me know if I can add some checks - I only see rehash processes that never terminate when if have rbenv bundler on, so that's quite positive.

from rbenv-bundler.

carsomyr avatar carsomyr commented on September 27, 2024

@kenips Could you insert a puts into the control flow of the rehash.rb script? Does it print endlessly?

from rbenv-bundler.

carsomyr avatar carsomyr commented on September 27, 2024

All, please update to 0.95 and let me how it goes. I believe that the ensure_capable_ruby problem should be fixed. Not so sure about the infinite looping.

from rbenv-bundler.

MikeMcQuaid avatar MikeMcQuaid commented on September 27, 2024

Seems fixed here and upgrade the Homebrew formula. Thanks!

from rbenv-bundler.

carsomyr avatar carsomyr commented on September 27, 2024

Closing for now.

from rbenv-bundler.

 avatar commented on September 27, 2024

@carsomyr just installed 1.9.3-p374, seems like it's coming back:

/usr/local/Cellar/rbenv-bundler/0.95/etc/rbenv.d/bundler/rehash.rb:342:in `ensure_capable_ruby': Could not locate a Ruby capable of running this script (RuntimeError)
        from /usr/local/Cellar/rbenv-bundler/0.95/etc/rbenv.d/bundler/rehash.rb:409
/usr/local/opt/rbenv/plugins/rbenv-bundler/etc/rbenv.d/bundler/rehash.rb:342:in `ensure_capable_ruby': Could not locate a Ruby capable of running this script (RuntimeError)
        from /usr/local/opt/rbenv/plugins/rbenv-bundler/etc/rbenv.d/bundler/rehash.rb:409
/usr/local/Cellar/rbenv-bundler/0.95/etc/rbenv.d/bundler/rehash.rb:342:in `ensure_capable_ruby': Could not locate a Ruby capable of running this script (RuntimeError)
        from /usr/local/Cellar/rbenv-bundler/0.95/etc/rbenv.d/bundler/rehash.rb:409
/usr/local/opt/rbenv/plugins/rbenv-bundler/etc/rbenv.d/bundler/rehash.rb:342:in `ensure_capable_ruby': Could not locate a Ruby capable of running this script (RuntimeError)
        from /usr/local/opt/rbenv/plugins/rbenv-bundler/etc/rbenv.d/bundler/rehash.rb:409

from rbenv-bundler.

carsomyr avatar carsomyr commented on September 27, 2024

@jugnooken What if you delete the files in ${plugin_root}/share/rbenv/bundler? Better yet, are you able to dump ruby_profiles.yml before you proceed? I would like to see its contents.

from rbenv-bundler.

 avatar commented on September 27, 2024

Seems to have fixed it - not sure how ruby_profiles.yml got into this state but after it regenerates ruby_version is now matching installed versions.

Before delete:

--- 
system: !ruby/object:OpenStruct 
  table: 
    :ruby_version: 
    - 1
    - 8
    - 7
    :gem_ruby_engine: ruby
    :gem_ruby_version: "1.8"
    :gem_dir: !ruby/object:Pathname 
      path: /Library/Ruby/Gems/1.8
1.9.3-p374: !ruby/object:OpenStruct 
  table: 
    :ruby_version: 
    - 1
    - 8
    - 7
    :gem_ruby_engine: ruby
    :gem_ruby_version: "1.8"
    :gem_dir: !ruby/object:Pathname 
      path: /Library/Ruby/Gems/1.8
1.9.3-p362: !ruby/object:OpenStruct 
  table: 
    :ruby_version: 
    - 1
    - 8
    - 7
    :gem_ruby_engine: ruby
    :gem_ruby_version: "1.8"
    :gem_dir: !ruby/object:Pathname 
      path: /Library/Ruby/Gems/1.8

After delete:


---
1.9.3-p362: !ruby/object:OpenStruct
  table:
    :ruby_version:
    - 1
    - 9
    - 3
    :gem_dir: !ruby/object:Pathname
      path: /usr/local/opt/rbenv/versions/1.9.3-p362/gemsets/3211
    :gem_ruby_engine: ruby
    :gem_ruby_version: 1.9.1
1.9.3-p374: !ruby/object:OpenStruct
  table:
    :ruby_version:
    - 1
    - 9
    - 3
    :gem_dir: !ruby/object:Pathname
      path: /usr/local/opt/rbenv/versions/1.9.3-p374/gemsets/3211
    :gem_ruby_engine: ruby
    :gem_ruby_version: 1.9.1
system: !ruby/object:OpenStruct
  table:
    :ruby_version:
    - 1
    - 8
    - 7
    :gem_dir: !ruby/object:Pathname
      path: /3211
    :gem_ruby_engine: ruby
    :gem_ruby_version: '1.8'

Do you force regenerate this file somewhere?

from rbenv-bundler.

carsomyr avatar carsomyr commented on September 27, 2024

@jugnooken I am beginning to suspect that it's this line.

from rbenv-bundler.

 avatar commented on September 27, 2024

First in path for me is /usr/local/opt/rbenv/libexec. Is that what you're expecting?

Before:

/usr/local/opt/rbenv/libexec:
/usr/local/opt/rbenv/plugins/rbenv-bundler/bin:
/usr/local/opt/rbenv/plugins/ruby-build/bin:
/usr/local/opt/rbenv/libexec:
/usr/local/opt/rbenv/plugins/rbenv-bundler/bin:
/usr/local/opt/rbenv/plugins/ruby-build/bin:
...

After:

/usr/local/opt/rbenv/plugins/rbenv-bundler/bin:
/usr/local/opt/rbenv/plugins/ruby-build/bin:
/usr/local/opt/rbenv/libexec:
/usr/local/opt/rbenv/plugins/rbenv-bundler/bin:
/usr/local/opt/rbenv/plugins/ruby-build/bin:
...

from rbenv-bundler.

carsomyr avatar carsomyr commented on September 27, 2024

@jugnooken As it turns out, that line I pointed out earlier is broken: It assumes that the script is running in rbenv-based Ruby, which isn't necessarily the case. As for the corrupted ruby_profiles.yml file, can you try the following two scenarios.

Scenario 1:

  1. Delete it.
  2. Initialize your PATH to have ${rbenv_root}/bin at the beginning.
  3. Do not run eval -- "$(rbenv init -)".
  4. Run rbenv rehash.

Scenario 2:

  1. Delete it.
  2. Ditto 2 above.
  3. Run eval -- "$(rbenv init)". You should see ${rbenv_root}/shims added to the beginning of PATH.
  4. Run rbenv rehash.

In scenario 1, you should see a corrupted file. In scenario 2, everything should be OK. Can you confirm? Thanks for your patience. My best guess is that somehow you were missing ${rbenv_root}/shims on your path when the ruby_profiles.yml file was being regenerated.

from rbenv-bundler.

 avatar commented on September 27, 2024

You're right. Once loaded without rbenv init I see same error as before.

from rbenv-bundler.

carsomyr avatar carsomyr commented on September 27, 2024

@jugnooken Ok, I will make the requisite fixes. Please confirm once @MikeMcQuaid propagates the changes into Homebrew. The plugin should work correctly even in absence of rbenv init -.

from rbenv-bundler.

MikeMcQuaid avatar MikeMcQuaid commented on September 27, 2024

If you tag as 0.4.1 I'll update the Homebrew formula.

from rbenv-bundler.

carsomyr avatar carsomyr commented on September 27, 2024

@jugnooken @MikeMcQuaid I believe that this issue is fixed, along with another serious bug. See 66463ee and 555f418 for details. The 0.95 tag has been updated.

from rbenv-bundler.

MikeMcQuaid avatar MikeMcQuaid commented on September 27, 2024

Please don't update tags like that; tags are meant to be static and Homebrew uses your versioned tag as the download source. When you update the tag you break the Homebrew formula for any new users and any existing users will not receive the upgrade. I'd be grateful if you can tag 0.96 (or 0.95.1) for this reason (even if it's identical to the updated 0.95). Thanks.

from rbenv-bundler.

carsomyr avatar carsomyr commented on September 27, 2024

@MikeMcQuaid Point taken! The next releases will have minor version numbers. Thanks for complaining. For now, just update the formula to reflect the latest 0.95.

from rbenv-bundler.

MikeMcQuaid avatar MikeMcQuaid commented on September 27, 2024

Already done, thanks.

from rbenv-bundler.

bjoernhaeuser avatar bjoernhaeuser commented on September 27, 2024

@carsomyr I have the current version of this installed via homebrew and having the same problem. I tried what you suggested some posts earlier. Still having the same problem. Any advice?

from rbenv-bundler.

carsomyr avatar carsomyr commented on September 27, 2024

@bjoernhaeuser Try wiping out the metadata directory located at ~/.rbenv/plugins/bundler/share/rbenv/bundler and rehashing.

from rbenv-bundler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.