Can't install Ruby 2.0.0 using RVM - ruby

I'm trying to install Ruby version 2.0.0 using RVM. I'm trying to use the Rails installer (railsinstaller.org).
I have downloaded the package and ran the installer and I have also restarted all terminal windows.
Here is the issue I am encountering:
my terminal http://img822.imageshack.us/img822/9704/stacks.png
As you can see, it says that RVM installed Ruby version 2.0.0. When I try to tell RVM to use this version it says that it is not installed.

Looks like it may have been fixed. Try rvm get head and then try again: https://github.com/wayneeseguin/rvm/issues/1832

Related

how to completely uninstall ruby if it has been install as a system at a Mac?

I has been install a ruby version 3.1.2 at my Mac computer and I want to uninstall it completely.
When I check by this command
which -a ruby
It show me this
/Users/nguyencuc/.rubies/ruby-3.1.2/bin/ruby
/usr/bin/ruby
So, as this page said, https://mac.install.guide/ruby/9.html, maybe it is a system ruby ?
So how can I completely uninstall this ruby to install another version of ruby ? Could you please give me some advices ? Thank you very much for your time.
As you have installed ruby, not using rbenv or rvm, there are two ways through which you can remove it.
Using Command brew uninstall --force ruby
Or you have to manually remove the ruby files from your system. Type whereis ruby to find where it is installed and then remove the files using rm
If you have installed ruby via Rbenv, type this:
rbenv uninstall 3.1.2
For installing another version, type:
rbenv install *version*

can't get sass command working on mac with 'brew install sass/sass/sass'

I installed Ruby many moons ago but never use it. Perhaps I inadvertently broke it as I seem to be having troubles with getting it working with the sass command.
After running the brew install sass/sass/sass I get the following error with sass command:
rbenv: sass: command not found
The `sass' command exists in these Ruby versions:
2.1.10
2.5.0
ruby -v yields:
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
which I'm guessing is the stock version of Ruby on a mac.
The rbenv command prints out help so it looks like I have that installed. brew list shows I have the ruby package installed. I upgraded ruby with brew but that didn't help (it reported I upgraded from 2.6.1 to 2.6.2. I don't appear to have rvm installed.
If you're using RVM you shouldn't need to brew install anything, in fact you shouldn't.
See documentation here https://github.com/sass/ruby-sass which is deprecated and will refer you to use https://github.com/sass/sassc-ruby instead.
brew uninstall any ruby and ruby packages and just use rbenv to manage your ruby versions.
Once you set your ruby version with rbenv global 2.6.1 for example or whatever version you want, then just do
gem install sassc
Or in your Gemfile add
gem 'sassc`
and run
bundle install

Why is ruby -v still showing version 2.0.0 even after successfully installing ruby 2.5.3?

I'm following this tutorial: https://jekyllrb.com/docs/installation/macos/#homebrew
I've successfully installed ruby 2.5.3, however, when I run "ruby -v" on the command line in Terminal, it still says ruby 2.0.0.
My friend told me something about local vs universal installation of ruby and how that can create a conflict, but I'm completely new to this so I'm having trouble understanding how to update the 2.0.0 to 2.5.3 (which I've successfully installed on my machine).
I suggest you install RVM: https://rvm.io/
The install instruction is on the site.
After you're done installing RVM do.
rvm install 2.5.3
Then test with ruby -v to check if you have the version you want (2.5.3). If not we can help you from that point.

I cannot update Ruby on Homebrew from 2.0.0 to 2.3.1

I am trying to upgrade Ruby because I need to setup a Jekyll template, and I need to latest version to do it. Since I have a Mac running Sierra, I already have Ruby preinstalled as well as the Homebrew installation. When I install it using brew install ruby, it works, but when I check the version, it is still at 2.0.0 instead of 2.3.1 where it should be. Homebrew says I have 2.3.1, but the CLI says I have 2.0.0. I tried to use brew link --override ruby to make it work, but it said everything was working and it got me nowhere.
Use rbenv and plugin ruby-build. It will keep several versions of ruby on the one machine.
After install go to directory with your code, run rbenv install 2.3.1 and create file .ruby-version containing 2.3.1. All scripts running from this directory will use ruby 2.3.1.
Or you will able to set ruby version for all running scripts - rbenv global 2.3.1

Not able to run bundle install or for that matter rails -v Rails 3.1.2

I was having issues with RVM so I tried to uninstall everything (Ruby, RVM and Rails) and start fresh.
I installed Ruby 1.9.2 and Rails 3.1.2 rc2 and I am working on Ubuntu 10.0.4. If I do ruby -v from the command prompt I am able to see the ruby version installed and same is true for rails -v.
However once I get into the application directory which and try to check rails -v I get this error
"Could not find rake-0.9.2 in any of the sources
Run bundle install to install missing gems."
If I do bundle install I am getting this error
"bash: /usr/bin/bundle: /usr/bin/ruby1.8: bad interpreter: No such file or directory"
Nothing seems to work and I am stuck in this recursive loop of uninstalling and installing.
Everything was working fine till I got an error linecache19 which requires Ruby >=1.9.2 (I was using 1.8.7 earlier). I installed RVM and Ruby 1.9.2, I had to uninstall RVM and 1.8.7 and I tried to install to install Ruby 1.9.2 as a standalone package. This obviously didn't work.
Please HELP!!
If you have uninstalled a previously installed Ruby version (in my case it was Ruby 1.8.7) and try to install latest Ruby version (I was trying to install 1.9.2) without using RVM. I manually deleted all the version of Ruby present by searching $whereis ruby from my command prompt.
After that I installed a ruby1.9.2. In my existing rails application I was getting lot of errors because the application creates a reference to the earlier installed ruby version (1.8.7) and try to find gems in the earlier installed location.
SO once you have installed a new version and want to run the earlier developed application search where your application is referencing the older version of ruby.
In my case I had to change the path in script/rails from #!/usr/bin/env to #!/usr/local/bin/ruby .
You might also have to add the path of the latest Ruby which you have installed in path variables.

Resources