# First custom theme issues

**URL:** <https://talk.jekyllrb.com/t/first-custom-theme-issues/3580>\
**Category:** Help\
**Created:** [November 12, 2019, 10:16am UTC](https://talk.jekyllrb.com/t/first-custom-theme-issues/3580 "2019-11-12T10:16:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ctuxboy](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/ctuxboy/32/2026_2.png) [@ctuxboy](https://talk.jekyllrb.com/u/ctuxboy)\
**Post date:** [November 12, 2019, 10:16am UTC](https://talk.jekyllrb.com/t/first-custom-theme-issues/3580/1 "2019-11-12T10:16:41Z")

</div>

Hello again,

Some (stupid) newbie questions. Trying understand how all the things work.

After generate my first custom theme, trying:

`$jekyll serve`

And shows this error:

**Bundler could not find compatible versions for gem “bundler”: (Bundler::VersionConflict)**  
\*\* In Gemfile:\*\*  
\*\* bundler (~\> 1.16)\*\*

\*\* Current Bundler version:\*\*  
\*\* bundler (2.0.2)\*\*  
**This Gemfile requires a different version of Bundler.**  
**Perhaps you need to update Bundler by running `gem install bundler`?**

**Could not find gem ‘bundler (~\> 1.16)’ in any of the relevant sources:**  
\*\* the local ruby installation\*\*

After that follow the instructions in the error-message, and type:

`$gem install bundler`

**ERROR: While executing gem … (Gem::FilePermissionError)**  
\*\* You don’t have write permissions for the /var/lib/gems/2.5.0 directory.\*\*

It works perfect, when execute as root:

`$sudo gem install bundler`

1. Is it normal that some ‘gem’-commands only works with root access?

After that retry:

`$jekyll serve`

But doesn’t work (again).

So, i solved change this line in gemspec:

**spec.add\_development\_dependency “bundler”, "~\> 1.16"**

with this line

**spec.add\_development\_dependency “bundler”, "~\> 2.0.2"**

1. When generate a new theme then you want change the bundler version with the version on my machine?

After that trying adding the theme to my Jekyll website:

cd myproject

Open the Gemfile and adding mytheme:

**gem “jekyll-theme-mytheme” =\> :path =\> "home/ubuntu/themes/jekyll-theme-mytheme"**

Type:

`$bundle`

But gives again error’s:

**[!] There was an error parsing `Gemfile`: syntax error, unexpected =\>, expecting end-of-input - …ll-theme-mytheme" =\> :path =\> "home/ubuntu/themes/jekyll-t…**  
**… ^~. Bundler cannot continue.**

\*\* # from /home/ubuntu/webapps/myproject/Gemfile:13\*\*  
\*\* # -------------------------------------------\*\*  
\*\* # gem “minima”, “~\> 2.5”\*\*  
\*\* \> gem “jekyll-theme-mytheme” =\> :path =\> “home/ubuntu/themes/jekyll-theme-mytheme”\*\*  
\*\* # # If you want to use GitHub Pages, remove the “gem “jekyll”” above and\*\*  
\*\* # -------------------------------------------\*\*

Try this also with:

`gem "jekyll-theme-mytheme" => :path => "/themes/jekyll-theme-mytheme/"`

`gem "jekyll-theme-mytheme" => :path => "/"`

…

Nothing works 😐

Hope someone can help me with this?

My working directories are:

_Notes:_

_ **project:** /home/ubuntu/webapps/myproject/_

_ **Themes:** /home/ubuntu/themes/jekyll-theme-mytheme/_

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [November 12, 2019, 11:02am UTC](https://talk.jekyllrb.com/t/first-custom-theme-issues/3580/2 "2019-11-12T11:02:10Z")

</div>

The error is that there is an incorrect usage of `=>` in your Gemfile. Correct it as following:

```diff
- gem “jekyll-theme-mytheme” => :path => "home/ubuntu/themes/jekyll-theme-mytheme"
+ gem "jekyll-theme-mytheme", :path => "home/ubuntu/themes/jekyll-theme-mytheme"

```

If it still errors, ensure that the path string is correct…  
Good luck!

---

<div class="post-metadata">

**Author:** ![ctuxboy](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/ctuxboy/32/2026_2.png) [@ctuxboy](https://talk.jekyllrb.com/u/ctuxboy)\
**Post date:** [November 12, 2019, 9:33pm UTC](https://talk.jekyllrb.com/t/first-custom-theme-issues/3580/3 "2019-11-12T21:33:03Z")

</div>

@ashmaroli,

Thanks man, it works perfect!!!

Following this tutorial, and that was the reason, i’m using the wrong code:

> **[Creating your own Jekyll Theme Gem](https://medium.com/@jameshamann/creating-your-own-jekyll-theme-gem-1f8180a0e4b8)**
>
> After searching for a short while, I found I couldn’t quite find a Jekyll Theme that I liked. All the ones that I came across needed a lot…
