Why can I not install ruby 1.9.3-p488 via homebrew? - ruby

I already have ruby version 2.0 but for a project, I need version 1.9.3-p448. When I try to run the ruby build I get the following:
ruby-build: definition not found: 1.9.3-p448
You can list all available versions with `rbenv install --list'.
If the version you're looking for is not present, first try upgrading
ruby-build. If it's still missing, open a request on the ruby-build
issue tracker: https://github.com/sstephenson/ruby-build/issues
The highest 1.9.3 version that comes up when i run rbenv install --list is 1.9.3-p429 and I can't figure out how to do a manual install. All of the documentation I have read only has instructions from the start but nowhere addresses this issue.

I had a similar problem and I uninstalled ruby build then reinstalled it and it worked. Hope that works!

You need to upgrade rbenv. 1.9.3-p448 is available in the current version.

Related

On Apple Silicon: ruby-build: definition not found: 3.0.0

When I try to install the latest ruby (3.0.0), it fails with:
ruby-build: definition not found: 3.0.0
Clearly, ruby 3 has been released more than a month ago, so I'm guessing the team is running into problems building/packaging it for Apple Silicon (M1) or no one's had the bandwidth to do so yet. How would I follow up on this?
ASDF users, try asdf plugin update ruby then asdf install ruby the_ruby_version_here
Have you tried brew update && brew upgrade rbenv ruby-build? That may help you get the latest available version of Ruby. You can try rbenv install --list to see what you have available.

RVM, where is Ruby 3.0.0?

I want to download the latest Ruby release(version 3.0.0), using RVM but I am faced with the following error when running rvm install 3.0.0:
Unknown ruby interpreter version (do not know how to handle): 3.0.0
I have also tried 3 & 3.0, but gives the same error.
According to this page, it should be available through RVM. I'm already using RVM to manage my ruby versions, so I don't want to use rbenv ... nor do I want to install from source.
How can I get Ruby version 3.0.0 installed using RVM?
If you have not updated rvm do that first RVM Upgrading
rvm get stable
# or
rvm get master # for even newer versions not in stable 3.0.0 in this case
To see all available rubies run
rvm list remote all
# or
rvm list known # as pointed out in the comments
you should see ruby-3.0.0 in the list of available rubies
Then run
rvm install ruby-3.0.0
In many parts of the world, the current time is holiday time. RVM is maintained by unpaid volunteers in their spare time, who might choose to spend time with their families.
Therefore, it might take a while for a new release of RVM to come out.
Also, there are a couple of bugs related to YARV 3.0.0 not working on the RVM bug tracker, obviously those will need to be fixed before a new release of RVM that supports YARV 3.0.0 can be released.
According to the RVM offline installation docs, the required extension to install any Ruby version is .tar.bz2.
Taking a look at the Ruby's 3 FTP folder, the .tar.bz2 is available only for the preview1 release. Neither the rc1 nor the official has that extension available yet.
I think we gotta wait for some maintainer to update the FTP folder with that extension.
First you need to upgrade the RVM. Then try to install the needed version again ->
rvm get master && rvm install 3.0.0
You can just rename the .tar.gz file to be a .tar.bz2 and everything will work. Here's the steps:
As stated in previous answers, update rvm to the latest stable version with:
rvm get stable
Download the release 3.0.0 gz file from: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.0.tar.gz
Move the downloaded file into your .rvm/archives folder and rename it to a .bz2 in the process:
mv ~/Downloads/ruby-3.0.0.tar.gz ~/.rvm/archives/ruby-3.0.0.tar.bz2
Make sure you've got at least gcc v8 installed, or newer. This is required due to the multi-threaded concurrency features of Ruby 3. I used gcc-10, which on my Mac I had installed with Homebrew. If you do use a newer version of gcc then you'll need to set the CC environment variable:
export CC=gcc-10
With everything now in place, install as usual, which will automatically find the appropriate .bz2 file in your archives folder:
rvm install ruby-3.0.0

Unable to use Sass on macOS Catalina

Since upgrading to Catalina I'm not being able to use Ruby Sass. I tried installing Node Sass but I keep getting this message:
dyld: Library not loaded: /Users/luiscarlospandocarrera/.rvm/rubies/ruby-2.5.0/lib/libruby.2.5.dylib
Referenced from: /Users/luiscarlospando/.rvm/rubies/ruby-2.5.0/bin/ruby
I tried uninstalling Ruby Sass, reinstalling it and I just keep getting this message.
What would I need to do?
Thanks in advance!
This looks like a Ruby problem, so maybe reinstall Ruby, or possibly bump to a newer version to see if that side-steps the issue. 2.7.0 is out and worth a shot. From time to time an OS upgrade will pull a library your locally built Ruby depends on, so you need to rebuild Ruby to link to the new, updated libraries.
Ruby SASS is EOL (26 March 2019) - https://sass-lang.com/ruby-sass and you should try to find other ways to "compile" your SASS files.
I uses sassc with PHPStorm as a runner for the themes that uses SASS.
Easiest way to install is by using homebrew:
brew install sassc
You should also consider using https://github.com/sass/dart-sass
I managed to solve this problem by installing the latest version of Ruby as suggested by tadman by using Ruby Version Manager (rvm).
To do it I did the following steps:
Installed the latest version of rvm:
curl -L https://get.rvm.io | bash -s stable and then I had to restart the terminal.
Installed the latest version of Ruby:
rvm install ruby-2.7.0
I did set v2.7.0 as the version of Ruby I wanted to use:
rvm --default use ruby-2.7.0
I hope this helps!

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

Can't install Ruby 2.0.0 using RVM

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

Resources