yousinix / portfolYOU

A beautiful portfolio Jekyll theme that works with GitHub Pages.
https://yousinix.github.io/portfolYOU
MIT License
1k stars 598 forks source link

Gem-based installation gives dependency error #80

Closed keunes closed 3 years ago

keunes commented 3 years ago

Hello,

In order to make stuff easier in future (in case of theme updates), I wanted to create a new site that relies on the theme gem (rather than having the theme files in my site folder).

So I did:

keunes@device:~/Documents/Sites$ jekyll new newsite
[Bundler does its thing]

I then updated _config.yml: Changed theme: minima into theme: portfolYOU

And I updated Gemfile: 1 Commented out gem "jekyll" 2 Changed gem "minima", "~> 2.5" into gem "portfolyou-jekyll-theme"

Then tried to ' bundle' the new configuration, but I get a dependency error:

keunes@device:~/Documents/Sites$ cd ./newsite
keunes@device:~/Documents/Sites/newsite$ bundle update
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Bundler could not find compatible versions for gem "i18n":
  In snapshot (Gemfile.lock):
    i18n (>= 1.8.10)

  In Gemfile:
    portfolyou-jekyll-theme was resolved to 2.3.0, which depends on
      jekyll (~> 3.8) was resolved to 3.9.1, which depends on
        i18n (~> 0.7)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Anything I'm doing wrong? Or are there theme dependencies not correct?

keunes commented 3 years ago

Sorry, deleting the Gemfile did the trick. Now on to moving over stuff I had adjusted, to the new site. And re-adding _config.yml stuff from the theme.

keunes commented 3 years ago

Actually, I had to add the gem kramdown-parser-gfm to my Gemfile before the project could be built:

Dependency Error: Yikes! It looks like you don't have kramdown-parser-gfm or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- kramdown-parser-gfm' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/! 
  Conversion error: Jekyll::Converters::Markdown encountered an error while converting '_posts/2021-08-20-welcome-to-jekyll.markdown':
                    kramdown-parser-gfm
             ERROR: YOUR SITE COULD NOT BE BUILT:
                    ------------------------------------
                    kramdown-parser-gfm

I believe that 'Welcome to Jekyll' post is there by default when creating a new site. Could this dependency be caused by the highlight or the link code?

{% highlight ruby %}
def print_hi(name)
  puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{% endhighlight %}

Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk].

{% include elements/button.html link="https://github.com" text="GitHub" style="primary" size="sm" %}

[jekyll-docs]: https://jekyllrb.com/docs/home
[jekyll-gh]:   https://github.com/jekyll/jekyll
[jekyll-talk]: https://talk.jekyllrb.com/
yousinix commented 3 years ago

In order to make stuff easier in future (in case of theme updates), I wanted to create a new site that relies on the theme gem (rather than having the theme files in my site folder).

If this is what you are looking for, consider using it as a remote_theme as it's mentioned in the docs.

yousinix commented 3 years ago

This fix will be available on RubyGems in the next release. I will push the release in the next couple of days, to include more fixes for other issues.