Bash CD commands outputting environment variables - ruby

I was trying to install ruby and makeFile along with rvm in windows but after their installation bash cd commands is outputting wired things on console.
I have uninstalled ruby and rest of the software but the issue still persist.

I deleted .rvm and .uru folder in c>Users>UserName and now the bash is working as expected.

Related

linuxbrew/lib/ld.so: bad ELF interpreter: No such file or directory

I am having a problem about linuxbrew.
bash: /lustre7/home/lustre4/user1/applications/bin/cut: /lustre7/home/lustre4/user1/.linuxbrew/lib/ld.so: bad ELF interpreter: No such file or directory
I tried to uninstall linuxbrew using instructions at its website, but somehow it didn't work (because of sudo requirements).
there is linuxbrew directory but I can't remove when I type rm -r linuxbrew it says;
-bash: /lustre7/home/lustre4/user1/applications/bin/rm: /lustre7/home/lustre4/user1/.linuxbrew/lib/ld.so: bad ELF interpreter: No such file or directory
When I tried to install homebrew it says your CPU is not supported. (I tried this before and it worked, but now it is not working.)
I want to solve this problem but I couldn't find any solution. I am not able to run sudo and yum commands because I am not root. I am a user at a linux cluster.
OK. I finally was able to solve this issue.
I am wring in case someone else may have the same issue.
First, this was related to a bash problem. I recently installed a tool that put some variables to both bashrc and bash_profile and altered path of bin directory.
I wasn't able to use system commands such as rm, ls, cat etc. and I wasn't able to run system ruby. Paths of all commands and ruby were in my bin directory under my application directory.
What I did is;
I edited my bash_profile by cancelling the new path that caused conflict between bash_profile and bashrc. This enabled me run system commands.
I uninstalled linuxbrew as described in its website.
I removed linuxbrew from my home directory, and cancelled its path in bash_profile (comment out).
I installed homebrew again and put its path to my bashrc.
Now it is working.
I could uninstall linuxbrew using the procedure I described in here:
How to completely uninstall brew and re-install brew in ubuntu 19.04
-> In short, I just replaced install.sh by uninstall.sh and it worked...
$/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"

RVM's auto-detect Ruby version via repo files feature is not working in VSCode login shell terminal

RVM has a feature to detect and use the correct Ruby version based on e.g. a .ruby-version file in the repo. This requires a login shell which I have enabled in VSCode via:
"terminal.integrated.shell.linux": "bash",
"terminal.integrated.shellArgs.linux": ["--login"],
However the feature isn't working by default, I have to cd . every time I open the terminal as if it is not a login shell.
There's a similar issue about new tabs in a gnome shell: https://github.com/rvm/rvm/issues/2519
I wonder if anyone else ran into this and whether this might be an issue with VSCode or RVM?
The reason this doesn't work by default is because rvm hooks the cd command in the shell to setup the ruby/gem paths for your project and there's no cd issued to the shell by the VS Code terminal opening.
I was able to resolve this issue on my Linux system by adding the login setup as suggested in the question and then adding a simple cd . at the end of my ~/.bash_profile after the section where RVM is actually set up.
Doing this results in rvm properly adjusting the paths in the VS Code terminal.
This may be a workaround..
Add this in vs
"terminal.integrated.shellArgs.linux": [
"cd ."
],

/usr/bin/env: ruby: No such file or directory

I use Ubuntu 14.04 and I have installed ruby with rbenv months ago. Everything was working fine but I believed I messed with $PATH doing other stuff and now it says /usr/bin/env: ruby: No such file or directory every time I try to use a command related to ruby.
rbenv versions
2.2.3
echo $PATH
/home/rafael/.rbenv/shims:/home/rafael/.rbenv/bin:/home/rafael/.rbenv/shims:/home/rafael/.rbenv/bin:/home/rafael/.rbenv/shims:/home/rafael/.rbenv/bin:/usr/local/heroku/bin:/home/rafael/.rbenv/plugins/ruby-build/bin:/home/rafael/.rbenv/shims:/home/rafael/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/rafael/.rvm/bin:/home/rafael/.rvm/bin
It is possible to find ruby 2.2.3 inside rbenv versions but it is like it is not installed. I am thinking of deleting everything and reinstall ruby. But I want to believe that there is a simpler solution that I am not seeing. Help, please.
It's one of 2 things
The path that crontab uses doesn't have your Ruby in it. This is usually because the "safe" path that cron uses doesn't include /usr/local/bin
Cron isn't finding the rbenv paths on the server.
You can set the path explicitly in your crontab and see if that fixes it in either case.

RVM not changing ruby version on cd (with bash-it)

I've installed bash-it recently and I noticed it broken RVM. When I enter a project directory, the ruby version is not changed (not matter if I use .rvmrc or .ruby-version). However, when I enter a project directory and then open a new tab/window in terminal, ruby version is changed. I tested it in Konsole and Gnome Terminal. I keep bash-it configuration in .bash_profile and I'm loading it in the end of .bashrc. Any ideas for the reason for such a strange behaviour?
EDIT: I tried to start bash as a login shell, but it doesn't work.

How to get Pik running in Git/Cygwin after it gets running in Command prompt of Windows XP?

I have Installed Ruby 1.8.7. Now I want to have Ruby 1.9.2 as well on my system.Having a windows system I have to go for PIK instead of RVm. I have already in place Cygwin and Git Bash. I now have installed pik through windows XP command prompt and changed the $PATH variable putting the pik path before ruby path. Now pik commands work sin windows but do not allow me to install new Ruby as throws anerror "1.9.2 is unknown". My Cygwin and Git gets the ruby version right but do not recognize pik common and I am not sure how to get it done. From other article i changed the the USER PROFILE variable in one of the bash files of Cygwin and also Git and tried but to no help.
I need your help in telling me exactly which file i need to put that common and in $USERPROFILE directory i could not locate any bash file and all my installation are on C drive.

Resources