Reputation: 349
I have a blog of mine in jekyll and I want to publish it on github-pages. Taking reference from here: https://help.github.com/articles/using-jekyll-with-pages. but I am getting this error while running bundle install
Gem::InstallError: public_suffix requires Ruby version >= 2.0.
An error occurred while installing public_suffix (1.5.1), and Bundler cannot continue.
Make sure that `gem install public_suffix -v '1.5.1'` succeeds before bundling.
below is the details of my gem env gem env :
RubyGems Environment:
- RUBYGEMS VERSION: 2.2.3
- RUBY VERSION: 2.1.6 (2015-04-13 patchlevel 336) [x86_64-linux-gnu]
- INSTALLATION DIRECTORY: /var/lib/gems/2.1.0
- RUBY EXECUTABLE: /usr/bin/ruby2.1
- EXECUTABLE DIRECTORY: /usr/local/bin
- SPEC CACHE DIRECTORY: /home/ashwin/.gem/specs
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /var/lib/gems/2.1.0
- /home/ashwin/.gem/ruby/2.1.0
- /usr/share/rubygems-integration/2.1.0
- /usr/share/rubygems-integration/2.1
- /usr/share/rubygems-integration/all
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/heroku/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /usr/games
- /usr/local/games
Upvotes: 2
Views: 10449
Reputation: 2060
In the past i've also had issues with installing github pages or Jekyll dependencies because there is a space somewhere in the full path to your project folder and apparrently some of the dependencies cant handle spaces in filenames.
Most recently this seems to have been happening to me with public_suffix
version 4.0.5 where a space in my username causes it to break
This has also happened with http_parser
Upvotes: 0
Reputation: 9397
Just like you my ruby version was correct, but the fix for me was reinstalling bundler.
sudo gem install bundler
Upvotes: 3
Reputation: 1
I had the same issue and this command solves it.
sudo gem install github-pages -v 33
Then run jekyll.
bundle exec jekyll serve
Upvotes: 0
Reputation: 4185
Try installing without sudo
.
I've had the same issue after upgrading Ruby to 2.2.3 with rbenv
(which is installed without admin rights).
After having upgraded, I ran sudo gem install github-pages
, which resulted in the above error. Running gem install github-pages
worked just fine.
Then, trying to have Jekyll serve my page, I ran bundle exec jekyll serve
, which told that there were some bundles missing. bundle install
fixed that too, and bundle exec jekyll serve
worked fine.
Upvotes: 1
Reputation: 52829
Make sure that gem install public_suffix -v '1.5.1'
succeeds before bundling.
Upvotes: 0