jeffreytse / jekyll-spaceship

🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
MIT License
606 stars 63 forks source link

NoMethodError: undefined method `config' for nil:NilClass (NoMethodError) #12

Closed hnguyentt closed 4 years ago

hnguyentt commented 4 years ago

Hello there,

I faced this issue when serving:

/usr/local/bundle/ruby/2.6.0/gems/jekyll-spaceship-0.7.2/lib/jekyll-spaceship/cores/config.rb:54:in `site_config': undefined method `config' for nil:NilClass (NoMethodError)

Some of my system information:

Ruby: ruby 2.6.4p104 (2019-08-28 revision 67798)
OS: Mac OS X 10.15.1
jeffreytse commented 4 years ago

Hi @nguyenhoa93

Could you show me your Jekyll version? or if you can build a minimal project and upload to here, that's better for me to address this issue.

Thanks and regards

hnguyentt commented 4 years ago

Thank you for your quick reply.

Here is my project: https://github.com/nguyenhoa93/dataisbeautiful/tree/reddit_jan_2018

I push the configs and installations in reddit_jan_2018 branch.

My Jekyll version: 4.0.0

I faced the issue when I served it locally. The long version:

jekyll_1     |   Jekyll Spaceship: 🚀 Jekyll-Spaceship 0.7.2
jekyll_1     |   Jekyll Spaceship: 🎉 A Jekyll plugin to provide powerful supports.
jekyll_1     |   Jekyll Spaceship: 👉 https://github.com/jeffreytse/jekyll-spaceship
jekyll_1     | /usr/local/bundle/ruby/2.6.0/gems/jekyll-spaceship-0.7.2/lib/jekyll-spaceship/cores/config.rb:54:in `site_config': undefined method `config' for nil:NilClass (NoMethodError)
jekyll_1     |  from /usr/local/bundle/ruby/2.6.0/gems/jekyll-spaceship-0.7.2/lib/jekyll-spaceship/cores/config.rb:38:in `load'
jekyll_1     |  from /usr/local/bundle/ruby/2.6.0/gems/jekyll-spaceship-0.7.2/lib/jekyll-spaceship.rb:11:in `<module:Spaceship>'
jekyll_1     |  from /usr/local/bundle/ruby/2.6.0/gems/jekyll-spaceship-0.7.2/lib/jekyll-spaceship.rb:9:in `<top (required)>'
jekyll_1     |  from /usr/gem/gems/bundler-2.1.4/lib/bundler/runtime.rb:74:in `require'
jekyll_1     |  from /usr/gem/gems/bundler-2.1.4/lib/bundler/runtime.rb:74:in `block (2 levels) in require'
jekyll_1     |  from /usr/gem/gems/bundler-2.1.4/lib/bundler/runtime.rb:69:in `each'
jekyll_1     |  from /usr/gem/gems/bundler-2.1.4/lib/bundler/runtime.rb:69:in `block in require'
jekyll_1     |  from /usr/gem/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in `each'
jekyll_1     |  from /usr/gem/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in `require'
jekyll_1     |  from /usr/gem/gems/bundler-2.1.4/lib/bundler.rb:174:in `require'
jekyll_1     |  from /usr/local/bundle/ruby/2.6.0/gems/jekyll-4.0.0/lib/jekyll/plugin_manager.rb:53:in `require_from_bundler'
jekyll_1     |  from /usr/local/bundle/ruby/2.6.0/gems/jekyll-4.0.0/exe/jekyll:11:in `<top (required)>'
jekyll_1     |  from /usr/local/bundle/bin/jekyll:29:in `load'
jekyll_1     |  from /usr/local/bundle/bin/jekyll:29:in `<main>'
jeffreytse commented 4 years ago

Hi @nguyenhoa93

Thanks for your report, this issue was addressed, and it's a loading site config issue when this plugin is added to the group :jekyll_plugins section.

If you like this project, welcome to star and I'll keep adding new features in future.

Thanks and regards

jeffreytse commented 4 years ago

Hi @nguyenhoa93

🎉 The latest gem version v0.7.3 has been released.

Thanks and regards

hnguyentt commented 4 years ago

Thank you so much, @jeffreytse

It worked for me now. :")

Thousands of 🤩