Skip to content
This repository has been archived by the owner on Nov 27, 2017. It is now read-only.

README does not specify ruby version requirement #12

Closed
derekbrokeit opened this issue May 27, 2013 · 5 comments
Closed

README does not specify ruby version requirement #12

derekbrokeit opened this issue May 27, 2013 · 5 comments
Assignees

Comments

@derekbrokeit
Copy link
Contributor

I just cloned homebrew on a linux box and got the following error:

.linuxbrew/Library/Homebrew/global.rb:80: uninitialized constant RUBY_PATCHLEVEL (NameError)
        from .linuxbrew/Library/brew.rb:17:in `require'
        from .linuxbrew/Library/brew.rb:17

My ruby version: ruby 1.8.5 (2006-08-25) [x86_64-linux]. I did some snooping and it seems that the ruby version that introduces RUBY_PATCH_LEVEL came out in December 2006. I suppose it would benefit the project to either announce this requirement or provide a workaround. Either way, it seems I must update ruby to get brew to work on my system (resetting the variable just leads to most things breaking), so I am compiling ruby and will report back.

@derekbrokeit
Copy link
Contributor Author

I just wanted to add that brew seemed to work acceptably with the old version of brew when I modified global.rb to have RUBY_PATCHLEVEL=0 (just to give it a value). However, I didn't actually play with it too much since I ended up installing my own ruby193 to get other things working. At the time, I didn't realize the requirement for HOMEBREW_CACHE to be set, which is why I said that I needed a new version of ruby.

I am actually quite surprised at how few formulas need modification to install properly, there is definitely great potential in this project! It would be good to widdle down the OSX specific stuff in Library/Homebrew first, since many strange errors occur on various function calls such as brew --config.

@MikeMcQuaid
Copy link
Contributor

@scicalculator Issues like this would be best answered with pull requests if possible.

@derekbrokeit
Copy link
Contributor Author

@MikeMcQuaid normally, I would agree, but I am not sure if we already know the minimum ruby requirements or perhaps we want to make homebrew-core 1.8.x compatible.

I decided to go through some testing with my older version of ruby ruby 1.8.5 (2006-08-25) [x86_64-linux] to see if there was a way to make homebrew cross platform enough to work on much older versions of ruby.

Known limitations to using brew with 1.8.5:

  • RUBY_PATCHLEVEL is not defined
  • instance_variable_defined? is not defined
  • pathname.rb:223 - 'Digest::SHA2' => 'Digest::SHA256' is necessary

If it is desirable to make homebrew more compatible with 1.8.5, I would be glad to go in and try to update the core, but for now, I have not changed the library.

Unfortunately, there seem to be a number of ruby defined functions/variables being used that would need to be explicitly fixed in the Homebrew library. Because of the added junk that might be necessary, I thought it would be best to simply state that 1.8.6 is a minimum requirement. However, I am having other troubles on 1.8.6 and I am not sure if this is a ruby problem or not. However, after installing ruby193, brew works very well on my system after fixing the compiler optimizations.

Also, #3 makes me think that ruby 2.0 may not work, but I have not tested this myself. If this was patched then it would be best to simply say anything newer than 1.8.6.

@MikeMcQuaid
Copy link
Contributor

Sure. I think if there are non-invasive patches to Homebrew that make it work they'd be accepted. However instance_variable_defined? seems a pretty big problem here. Stating 1.8.6 as required in the README (and making a pull request to edit the README) would be great if you can!

@mistydemeo
Copy link
Contributor

I have these changes made in Tigerbrew for Ruby 1.8.2 already. However, I'm not sure how much it's worth making these changes for Homebrew/Linuxbrew. Tigerbrew is in a situation where changing the Ruby version isn't really practical, and a few features have to be sacrificed to work with such an old Ruby version.

derekbrokeit added a commit to derekbrokeit/homebrew that referenced this issue May 30, 2013
For now, it seems that homebrew-core requires Ruby 1.8.6

Known limitations of Ruby 1.8.5:
* RUBY_PATCHLEVEL is not defined
* instance_variable_defined? is not defined
* pathname.rb:223 - 'Digest::SHA2' => 'Digest::SHA256' is necessary

closes Linuxbrew/legacy-linuxbrew#12
MikeMcQuaid added a commit that referenced this issue Jun 6, 2013
Add some basic documentation.

Closes #10.

Add ruby 1.8.6 requirement

For now, it seems that homebrew-core requires Ruby 1.8.6

Known limitations of Ruby 1.8.5:
* RUBY_PATCHLEVEL is not defined
* instance_variable_defined? is not defined
* pathname.rb:223 - 'Digest::SHA2' => 'Digest::SHA256' is necessary

Closes #12
Closes #15

Add instructions to set LD_LIBRARY_PATH in .bashrc

Closes #9
MikeMcQuaid added a commit that referenced this issue Jun 26, 2013
Add some basic documentation.

Closes #10.

Add ruby 1.8.6 requirement

For now, it seems that homebrew-core requires Ruby 1.8.6

Known limitations of Ruby 1.8.5:
* RUBY_PATCHLEVEL is not defined
* instance_variable_defined? is not defined
* pathname.rb:223 - 'Digest::SHA2' => 'Digest::SHA256' is necessary

Closes #12
Closes #15

Add instructions to set LD_LIBRARY_PATH in .bashrc

Closes #9
MikeMcQuaid added a commit that referenced this issue Jun 27, 2013
Add some basic documentation.

Closes #10.

Add ruby 1.8.6 requirement

For now, it seems that homebrew-core requires Ruby 1.8.6

Known limitations of Ruby 1.8.5:
* RUBY_PATCHLEVEL is not defined
* instance_variable_defined? is not defined
* pathname.rb:223 - 'Digest::SHA2' => 'Digest::SHA256' is necessary

Closes #12
Closes #15

Add instructions to set LD_LIBRARY_PATH in .bashrc

Closes #9
MikeMcQuaid added a commit that referenced this issue Aug 29, 2013
Add some basic documentation.

Closes #10.

Add ruby 1.8.6 requirement

For now, it seems that homebrew-core requires Ruby 1.8.6

Known limitations of Ruby 1.8.5:
* RUBY_PATCHLEVEL is not defined
* instance_variable_defined? is not defined
* pathname.rb:223 - 'Digest::SHA2' => 'Digest::SHA256' is necessary

Closes #12
Closes #15

Add instructions to set LD_LIBRARY_PATH in .bashrc

Closes #9
@sjackman sjackman self-assigned this Jun 11, 2014
sjackman pushed a commit to Linuxbrew/brew that referenced this issue Apr 23, 2016
Add some basic documentation.

Closes Linuxbrew/legacy-linuxbrew#10.

Add ruby 1.8.6 requirement

For now, it seems that homebrew-core requires Ruby 1.8.6

Known limitations of Ruby 1.8.5:
* RUBY_PATCHLEVEL is not defined
* instance_variable_defined? is not defined
* pathname.rb:223 - 'Digest::SHA2' => 'Digest::SHA256' is necessary

Closes Linuxbrew/legacy-linuxbrew#12
Closes Linuxbrew/legacy-linuxbrew#15

Add instructions to set LD_LIBRARY_PATH in .bashrc

Closes Linuxbrew/legacy-linuxbrew#9
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants