-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Feature request: rvm get head could check all $PATH items vs rvm default #3212
Comments
are you using OMZ? => ohmyzsh/ohmyzsh#1359 |
Yes - I'm a bit confused though. I can't see how that's an issue, since I ruined the path myself. I wish it was clear in the RVM docs how the path should be set up and at what point - then I could at least have a reference to know if the path is correct or not (I can debug shell code). |
OMZ does set the PATH, I thought you were hit by the mentioned bug, as for setting default ruby it's documented here: https://rvm.io/rubies/default the problem with detecting wrongly set PATH is that it would be slowing down all commands |
From what I understand the path looks good: https://github.com/robbyrussell/oh-my-zsh/blob/master/templates/zshrc.zsh-template#L52 I don't mean the docs, I how RVM works internally. E.g. the docs don't explain the relation between the PATH and how that affects RVM. So I have no idea what a "rvm-compatible" PATH looks like. I even had no idea that no $GEM_HOME is an error.
That's why I suggested putting that in |
Another idea: maybe the |
that's an idea to restrict the check to |
E.g. |
I'm a developer, so I ❤️ things like dumped callstacks, core files, exceptions, errors - because they help quickly find the cause. If RVM was crashing instead of "silently not working for unknown reasons", I'd just be sending PRs... ;) Anyway, don't let this take your focus away from the great work you're doing! And thanks for RVM! You're TOTALLY AWESOME! |
the thing is that RVM only sets the environemnt, ther is no involvment of RVM when executing anything else, when you run when you run RVM commands it could be checked but this check should not be always on, as it would be a slowdown: all that said I have few ideas and will try to add them today |
please test it with |
Strange. I didn't get the warning from the commit you made at all. Here's what happened:
I checked from a virtual console to make sure - I just couldn't trigger the warning from the above commit (instead I got the I might have had the zshrc warning during earlier I'm just letting you know, because I couldn't trigger the warning from the above commit (although checking $GEM_HOME would have worked, because previously they were unset when I used the path). Anyway, it works beautiful. Thank you so much! Have a great weekend! |
and this adds a warning for |
I don't see any performance issues with checking If $GEM_HOME isn't set, people are using the system ruby, right? |
yep it's usually system ruby - or a bug like in your case |
I works great! I'm a very happy RVM user :) |
great, let me know if you hit more problems |
So what's the solution to avoid |
@rubmoa read the whole message and check your shell initialization files, it's out of RVM control. |
I'm seeing this issue as well after installing RVM on a vanilla chef/ubuntu1404 box via vagrant. Using a shell script to provision. No zsh or anything out of the ordinary here. ubuntu_rvm ()
{
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
curl -L https://get.rvm.io | sudo bash -s stable
source /etc/profile.d/rvm.sh
sudo usermod -a -G rvm $(whoami)
rvm autolibs enable
rvm install $SYSTEM_RUBY_VERSION --auto-dotfiles
rvm use $SYSTEM_RUBY_VERSION@$SYSTEM_RUBY_GEMSET --default --create
ubuntu_log_info "Finished installing RVM!"
} |
@rubmoa If you are using zsh, you can avoid this by adjusting the path in your .zshrc file. Refer to this: http://stackoverflow.com/questions/27784961/received-warning-message-path-set-to-rvm-after-updating-ruby-version-using-rvm |
Also, if you happen to be be root (from sudo) using |
@Albertc this issue is closed. If you encounter a problem, please open a new issue (you might include reference to this issue if you feel it is somehow connected) |
None of this fixed it for me, here's what did:(Sorry about the huge title, but there's way too much noise in this issue thread) Like some others, I had no clobbering of $PATH in my .zshrc, or in my .zlogin, but still saw this warning every time a new shell was created.
This is heavy-handed. It squelches all output of those two commands, and relies on |
I have tried @voltaaage notes but I still not working. I have been wondering that because I upgrade the my ubuntu 14.04 to 16.04. I have Postgres in my ubuntu when I updated it. Thanks. |
The issue may be closed, but I'm still being directed here by RVM, with no good explanation of what is wrong. I'm using bash, not zsh, so the things to try just don't apply to me. The error message in RVM directs me here, still (after updating to the latest version.) What's the point of directing people here if there's no solution listed here? Why are you still directing people to a closed issue you don't want them commenting on? |
@andrakis could you please create a new issue and I will then look at it and try to help you. This thread is very cluttered... |
Why does RVM direct us to this page? Very unhelpful. |
I started an emacs shell (running bash) and get the error
|
Hey all, I ran into the same issue and after checking my export paths in So then I changed:
to this
Refreshed my shell and issue was solved. |
@ChasManRors how do you solve it ? |
More details can be found here: rvm/rvm#3212 In brief, these environment variables need to be available if I want to use rvm and rvm gemsets inside a terminal inside a buffer in Emacs.
Just in case there is someone else like me suffering now that warning: |
You can also install the 2018.3 EAP if you prefer: contains a fix for the issue: https://youtrack.jetbrains.com/issue/RUBY-22254 |
Upgrading RubyMine to 2018.2.4 seem to have fixed the warning on |
i understand this is closed, but AWS Cloud9 still references this link when it it's showing the warning below, when it's actually NOT exactly the same issue:
And the reason for that is simply because some env. config are missing the complete path, here is how to fix it:
|
I ran into this issue a few times using AWS Cloud9. Recently fixed it by reinstalling the ruby version. |
terminal input -> rvm use default
ubuntu:~/environment $ rails
ubuntu:~/environment $ rvm use default ubuntu:~/environment $ rails Options:
|
I don't know what the hell just happened but rvm suddenly started showing that ugly warning. I had to move my scripts and finally make it work by just appending That is kinda confusing actually because |
For anyone arriving here from AWS Cloud9, what solved it for me without side effects was adding the following line to the end of my ~/.bash_profile file:
It seems that rvm expects to find itself at the end of PATH (I'm assuming, since this fixes the warning messages issue). |
I deleted the warning from If you're gonna hardcode a link in an error message, make it a link to an answer. Not a question. |
I was struggling with this issue. What I found was that I had an older version of Ruby installed than I needed and it was causing this problem. I had Ruby 2.6.6 and 3.0.4 installed. This conflict was causing a problem. I uninstalled 2.6.6 and my problem was solved.
|
Thank you @LightMan, this was the solution for me. |
After tinkering around for a full hour : -Opened ~/.bashrc (your home folder) with nano export GEM_HOME="$HOME/.rvm/gems/ruby-3.2.2" Make sure you replace "ruby-3.2.2" with your actual version. |
TL;DR - this feature would have saved me lots of time and frustration
Symptoms (which I didn't know how to debug):
ruby -v
correctly reported 2.1.5rvm list
showed 2.1.5 as default (*
character) ... but it was not selected as current (no=
character)rvm use default
fixed things, but new tmux sessions had the same problemrvm get head
(or stable) didn't help or even report issuesThe cause: I had pasted my path into
~/.zshrc
like so:I think this should have caused at least an error because:
After browsing through rvm code I finally worked this out just by "bisecting" my zsh config (commenting thing out until it still worked or stopped).
I honestly would have preferred for RVM to have failed with a syntax error (which I could deal with).
But I'm glad I sorted this out, so I'm sharing this.
The text was updated successfully, but these errors were encountered: