Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install with --pre under Ubuntu: Asks for Ruby >= 2.0.0 when it’s 2.2.0 #3558

Closed
kleinfreund opened this issue Mar 9, 2015 · 16 comments
Labels
frozen-due-to-age support This is a question about Jekyll's usage.

Comments

@kleinfreund
Copy link

Although I have Ruby 2.2 installed, the installation of Jekyll 3.0.0.beta is aborted due to the required ruby version being 2.0.0.

philipp@RAUMBASIS:~$ git --version
git version 2.3.2
philipp@RAUMBASIS:~$ sudo gem cleanup
[sudo] password for philipp: 
Cleaning up installed gems...
Clean Up Complete
philipp@RAUMBASIS:~$ sudo gem install jekyll --pre
Fetching: jekyll-3.0.0.pre.beta1.gem (100%)
ERROR:  Error installing jekyll:
    jekyll requires Ruby version >= 2.0.0.
philipp@RAUMBASIS:~$ ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
philipp@RAUMBASIS:~$ 
@envygeeks
Copy link
Contributor

That's gotta be a bug in RubyGems?

@kleinfreund
Copy link
Author

I try to update Ruby and RubyGems. After that I’ll try using a different Ruby version with rvm (i.e. 2.1.5).

@envygeeks
Copy link
Contributor

This might either be an edge on your system (what do you use to manage your Ruby? I build mine into /opt/ruby) or an edge in RubyGems. I just manually installed the gem on my system and it immediately let me remove it.

jordon@laptop:~/development/envygeeks/docker$ gem --version && ruby --version
2.4.6
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]

@envygeeks envygeeks self-assigned this Mar 9, 2015
@kleinfreund
Copy link
Author

I updated Ruby via rvm from 2.2.0 to 2.2.1. Also did sudo gem update --system which installed rubygems-2.4.6. Issue is not resolved by that.

Next thing. rvm install 2.1.5 && sudo gem install jekyll --pre. Same thing.

@envygeeks
Copy link
Contributor

What is the value of $GEM_HOME?

@kleinfreund
Copy link
Author

philipp@RAUMBASIS:~$ echo $GEM_HOME
/home/philipp/.rvm/gems/ruby-2.2.1

(Changes accordingly when I do rvm use 2.x.x)

@envygeeks
Copy link
Contributor

For now since I don't know how this bug is existing lets just see if we can work around the edge:

find ${GEM_HOME} -type f -name jekyll.gemspec -exec sed -i 's/10 s/^/#//g' {} \; && gem uninstall jekyll

@kleinfreund
Copy link
Author

philipp@RAUMBASIS:~$ find ${GEM_HOME} -type f -name jekyll.gemspec -exec sed -i 's/10 s/^/#//g' {} \; && gem uninstall jekyll
Remove executables:
    jekyll

in addition to the gem? [Yn]  y
Removing jekyll
Successfully uninstalled jekyll-2.5.3
philipp@RAUMBASIS:~$ sudo gem install jekyll --pre
[sudo] password for philipp: 
ERROR:  Error installing jekyll:
    jekyll requires Ruby version >= 2.0.0.

Got it running under OS X (same Ruby/RubyGems version) in the meantime without issues.

@envygeeks
Copy link
Contributor

Perhaps @mpapis or @drbrain can provide some insight? Since both of their softwares are included.

@envygeeks
Copy link
Contributor

Also @kleinfreund we provide a jekyll binary for Ubuntu now (with isolated Ruby and packages) in the meantime while I try to figure out how this is happening perhaps you can use that: https://github.com/jekyll/jekyll/releases/tag/v3.0.0.beta2

@mpapis
Copy link

mpapis commented Mar 9, 2015

drop the sudo and try: gem install jekyll --pre - when you run with sudo it goes to system ruby so you would need to check sudo ruby -v and sudo gem -v

@kleinfreund
Copy link
Author

@mpapis Yikes, I always felt that this was not the right way to handle things, since installing Ruby Gems on OS X always worked without sudo. Best thing would be to reinstall the whole stuff without sudo, huh?

@envygeeks Thanks for you help, I’ll first try to get Ruby/RubyGems to work on Ubuntu without sudo as this seems to be the more logical approach. I’ll come back to the binaries later.

@kleinfreund
Copy link
Author

Alright, it worked. What did I do?

  • rvm remove 2.2.1 && rvm remove 2.1.5 to remove the current rvm rubies I had
  • rvm install 2.2.1 to reinstall the latest Ruby version
  • gem install sass jekyll-sitemap jekyll-sass-converter jekyll to install my default gems
  • gem install jekyll --pre to install beta (which strangely is beta1, should it not be beta2?)
  • gem uninstall jekyll -v 2.5.3 && gem uninstall liquid -v 2.6.2 to remove conflicting gems

Thank you guys for your help 👍

@envygeeks envygeeks removed their assignment Mar 9, 2015
@envygeeks envygeeks added the support This is a question about Jekyll's usage. label Mar 9, 2015
@envygeeks
Copy link
Contributor

Closing this ticket now then. Glad it's fixed! Thanks @mpapis

@parkr
Copy link
Member

parkr commented Mar 9, 2015

It was the uses of sudo, yep glad you guys got this fixed!

@maximevaillancourt
Copy link

Same here. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age support This is a question about Jekyll's usage.
Projects
None yet
Development

No branches or pull requests

6 participants