Skip to content

Instantly share code, notes, and snippets.

@deomorxsy
Last active August 18, 2019 20:45
Show Gist options
  • Save deomorxsy/af1364ddac83d02003c8d9e6d1b7bcd5 to your computer and use it in GitHub Desktop.
Save deomorxsy/af1364ddac83d02003c8d9e6d1b7bcd5 to your computer and use it in GitHub Desktop.

Jekyll Serve Traceback Error

Could not find 'public_suffix' (>= 2.0.2, < 4.0) - did find: [public_suffix-4.0.0]

[asari@asari-pc xxxxxxxxx.github.io]$ jekyll serve 
Traceback (most recent call last): 
        12: from /usr/bin/jekyll:23:in `<main>' 
        11: from /usr/lib/ruby/2.6.0/rubygems.rb:304:in `activate_bin_path' 
        10: from /usr/lib/ruby/2.6.0/rubygems.rb:304:in `synchronize' 
         9: from /usr/lib/ruby/2.6.0/rubygems.rb:305:in `block in activate_bin_path' 
         8: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:1417:in `activate' 
         7: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:1435:in `activate_dependenci 
es' 
         6: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:1435:in `each' 
         5: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:1449:in `block in activate_d 
ependencies' 
         4: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:1417:in `activate' 
         3: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:1435:in `activate_dependenci 
es' 
         2: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:1435:in `each' 
         1: from /usr/lib/ruby/2.6.0/rubygems/specification.rb:1446:in `block in activate_d 
ependencies' 
/usr/lib/ruby/2.6.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'public_suffix 
' (>= 2.0.2, < 4.0) - did find: [public_suffix-4.0.0] (Gem::MissingSpecVersionError) 
Checked in 'GEM_PATH=/home/asari/.gem/ruby/2.6.0:/usr/lib/ruby/gems/2.6.0', execute `gem en 
v` for more information 

the command down bellow should fix the problem:
[asari@asari-pc xxxxxxxxx.github.io]$ gem install public_suffix --version 2.0.2 
Fetching public_suffix-2.0.2.gem 
WARNING:  You don't have /home/asari/.gem/ruby/2.6.0/bin in your PATH, 
          gem executables will not run. 
Successfully installed public_suffix-2.0.2 
Parsing documentation for public_suffix-2.0.2 
Installing ri documentation for public_suffix-2.0.2 
Done installing documentation for public_suffix after 0 seconds 
1 gem installed 

now run the jekyll serve again to serve it in localhost:4000.
[asari@asari-pc xxxxxxxxx.github.io]$ jekyll serve 
Configuration file: /home/path-to-your-site-directory/xxxxxxxxx.github.io/_config.yml 
            Source: /home/path-to-your-site-directory/xxxxxxxxx.github.io 
       Destination: /home/path-to-your-site-directory/xxxxxxxxx.github.io/_site 
 Incremental build: disabled. Enable with --incremental 
      Generating... 
                    done in 0.455 seconds. 
 Auto-regeneration: enabled for '/home/path-to-your-site-directory/xxxxxxxxx.github.io' 
    Server address: http://127.0.0.1:4000 
  Server running... press ctrl-c to stop.

source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment