New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to latest RVM breaks on OSX #4618
Comments
Are you on macOS Mojave 10.14.3 (18D42)?
|
I understand what it should be, I agree, however I edited the installed script and injected an "echo" to check what it is at the time it's executing that line of code and when it gets to that point, it's definitely blank. I am currently on Mojave 10.14.2 I edited as follows:
Output as follows:
|
It does not appear that |
Could you please run |
|
So definitely your system is recognized correctly. Can you check |
|
Could you run |
I have managed to generate a traceback. In case this is useful to you, unfortunately line numbers in
|
Unfortunately |
Do you have |
I do not have an rvmrc in the project folder, I only have a
|
You should have only one entry there :) Don't think this is related to this issue, but can you try? |
I tried that, without any change. At least now it's clean for the future. |
I think I have a lead on the problem.
to rather look like this
... which seems to have fixed the issue. Something in my PATH appears to be breaking RVM I'm still looking into it to determine exactly what. |
I don't see a difference between those two examples? |
Apologies, I fixed the examples above. For fun, here's an ugly one-liner that identifies any $PATH duplicate executables thrown together to try figure out where things were going wrong here:
|
It appears I pre-emptively closed this.
|
@clive-hetzner could you add |
I am experiencing this issue as well.
I don't know a lot about this but it seems rvm, when cd'ing into a repo is creating a new path but not inheriting the old $PATH. |
More info:
I can't really put my whole ~/.bash_profile here but I did attempt to declare the PATH variable before and after this line but it did not fix the PATH:
But when I remove ^ line from my .bash_profile I get no errors....though that renders rvm useless as my |
Could you run |
@danmayer this is 100% exactly what I'm experiencing myself. System detection is simply never being called, however the replies I keep getting from the devs ask about sed version. See my full traceback showing it's unset, on this comment above: #4618 (comment) |
yes I agree it is about system detection the |
I have created a Dockerfile which fakes uname identification as OSX Darwin within an Ubuntu Dockerfile and shows where and how things are going wrong. There are three things required under normal circumstances in order to trigger this bug:
All three of the above required "triggers" are setup within the attached Dockerfile. Building the Dockerfile will not only set up the pre-conditions but also execute the failure during the last part of it's build, showing the sudden change in sed behaviour due to system detection failing, see the following screenshot which shows the Dockerfile build and the sudden change in arguments: You can be execute and test this out yourselves simply by putting the attached Dockerfile in a folder by itself and running: Here's the full content of the Dockerfile, verbatim:
|
Wow, great work @clive-hetzner amazing simple small reproducible version of the issue. Should make it easier to fix. Thanks, for the work on this. I was on zsh, of course ;) |
As if there's anything else ;) - yea I'm hoping this helps find the issue itself, it's been quite frustrating to me and some of the others on my team. I wish I knew more about rvm's internal mechanics to try isolate exactly where/how - so I've helped as far as I could. |
@pkuczynski (cc: @danmayer ) it appears this bug has been here a long time, however it was hidden until this fix d105f0b Reverting that change, on my system, "fixes" the issue (hides it again). |
Commenting out line 299 in |
If it helps, I ran into this going into a directory with a |
+1 seeing the exact same issue. You can see how just ~ $ echo $PATH
/Users/igeek/.rvm/gems/ruby-2.5.3/bin:/Users/igeek/.rvm/gems/ruby-2.5.3@global/bin:/Users/igeek/.rvm/rubies/ruby-2.5.3/bin:/usr/local/sbin:/Applications/Sketch.app/Contents/Resources/sketchtool/bin/:/Users/igeek/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin:/opt/X11/bin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin
~ $ cd Projects/Siteswap
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
(eval):1: command not found: cat
(eval):1: command not found: cat
~/Projects/Siteswap $ echo $PATH
/Users/igeek/.rvm/gems/ruby-2.5.3/bin:/Users/igeek/.rvm/gems/ruby-2.5.3@global/bin:/Users/igeek/.rvm/rubies/ruby-2.5.3/bin:/Users/igeek/.rvm/bin:
~/Projects/Siteswap $ cd
(eval):1: command not found: cat
(eval):1: command not found: cat
~ $ echo $PATH
/Users/igeek/.rvm/gems/ruby-2.5.3/bin:/Users/igeek/.rvm/gems/ruby-2.5.3@global/bin:/Users/igeek/.rvm/rubies/ruby-2.5.3/bin::/Users/igeek/.rvm/bin |
This issue is still here after upgrade to Catalina. |
+1 |
No it does not. This issue has nothing at all to do with sed, that has been proven, please let's not go down that path again. |
I don't give a damn what this issue is about, but checking out this branch helps to get rid of this trouble quickly without exploding universe. |
No it does not get rid of this issue. If it fixes it for you, it's not this issue, it's a different one. |
Correct! This is a platform detection & CLI flag API incompatibility issue. The original symptom / error was:
This is due to the fact that Mac OS is originally based on BSD, not GNU! As such, the macOS version of You can verify this is the case by issuing
Note the mention of The GNU version of the utility supports option |
Building on my previous comment towards a potential solution... TLDR;We could try using Ideally, all platforms and versions of Rationale / Problem DescriptionRVM is a command line utility that relies on a shell ( Due to the fact that shells and CLI utilities on various Below are the manual pages for the macOS Mojave MacOS / BSDNote: Maybe some BSD variants, but not all... see
GNU / Linux
|
I feel that altering the sed behaviour is just (re)hiding the underlying bug that system detection is never executed in this one case - re-entering an rvm folder after having exited it. |
... I'm just worried that another issue related to this will resurface, if anyone's wondering why i'm harping on about this. This issue has had severe impact for my team. // out |
Proposed fix in PR #4711 to use POSIX.2 I'm guessing this fixes on most POSIX platforms, and it "works for me" ™️ on the following that I tested:
Note that this may break backwards compatibility for older versions of |
It's already an arguably a loose assumption that OSX / platform version accurately reflects a version of If we can rely on most modern shell +
Yeah, you're probably right 😉 Not sure where else it might crop up, but in this particular case as mentioned above, the test doesn't really check for the exact thing it needs to check for, C'est la vie 🤷♂
I was able to reproduce with |
I have same issue |
I need a help to fix this issue please : RVM can not be run with I'm using Catalina |
@chatwyn , @apkagh This should be fixed as of #4711 What version of RVM are you using? Can you try:
Also another workaround was mentioned here, if for some reason you need to stay on an older version of RVM: remove the |
After doing a
rvm get master
RVM no longer activated when I enter any ruby directory, instead I get failures as follows:The issue appears to be in
scripts/functions/utility
around lines 60-67:When entering this code
${_system_type}
is blank andDarwin
is therefore misdetected.The text was updated successfully, but these errors were encountered: