I am trying to install homebrew on linux. I followed the instructions at https://github.com/Homebrew/linuxbrew and installed homebrew with no errors but when i try to execute, i am getting the below error.

upendra_35@172 Softwares]$ ~/.linuxbrew/bin/brew
/home/upendra_35/.linuxbrew/Library/Homebrew/global.rb:38: uninitialized constant RUBY_PATCHLEVEL (NameError)
    from /home/upendra_35/.linuxbrew/Library/brew.rb:15:in `require'
    from /home/upendra_35/.linuxbrew/Library/brew.rb:15

Can someone help me with this?


Linuxbrew requires Ruby 1.8.6 or newer. Ruby 1.8.6 is the version where the RUBY_PATCHLEVEL constant was defined, as well as other features that Linuxbrew needs anyway.

Ruby 1.8.6 came out in March 2007, so this shouldn't be a very onerous requirement. If you have a very old system (CentOS 5?) you'll need to install a more recent version of Ruby. RVM is an easy way to install Ruby and Ruby libraries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.