Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build site #2

Closed
mttjj opened this issue Jun 18, 2017 · 4 comments
Closed

Unable to build site #2

mttjj opened this issue Jun 18, 2017 · 4 comments

Comments

@mttjj
Copy link

mttjj commented Jun 18, 2017

I installed the jekyll-gitlab-letsencrypt gem (version 0.0.1 is showing up when I run gem list). And I added the gem to my _config.yml so it looks like this: gems: [jekyll-paginate, jekyll-gitlab-letsencrypt] but running jekyll build always throws this error. I don't know what I'm doing wrong.

Dependency Error: Yikes! It looks like you don't have jekyll-gitlab-letsencrypt 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 -- jekyll-gitlab-letsencrypt' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!

For reference, I'm using the second method of jekyll plugins mentioned on this page: https://jekyllrb.com/docs/plugins/

Please help and thank you!

@JustinAiken
Copy link
Owner

Do add it to the Gemfile under the jekyll-plugins group, but don't add it to the _config's gems..

Gemfile

source "https://rubygems.org"

gem 'jekyll'
..

group :jekyll_plugins do
  ...
  gem 'jekyll-gitlab-letsencrypt'
end

_config.yml

...
# Plugins
gems:
  - jekyll-avatar
  - jekyll-feed
  - jekyll-seo-tag
  - jekyll-sitemap
   ...
  # NO jekyll-gitlab-letsencrypt

...

gitlab-letsencrypt:
  personal_access_token: 'secret'   
  gitlab_repo: 'secret' 
  email: 'secret'        
  ...

@mttjj
Copy link
Author

mttjj commented Jun 18, 2017

That worked and allowed me to start using the plugin. However my build keeps failing on Gitlab. It can't find the plugin (https://gitlab.com/mttjj/mttjj.gitlab.io/builds/18946354). What else am I doing wrong?

@JustinAiken
Copy link
Owner

In your gitlab ci config, try doing gem install bundler && bundle install instead of just gem install jekyll

@mttjj
Copy link
Author

mttjj commented Jun 18, 2017

FINALLY got it all working.

I moved all of my plugins to the Gemfile instead of a mix between the two. I updated my ci config to what it shows now. And then I was having trouble with a 404 page not found but I updated the pretty_url setting to true and everything started working.

Thanks for your help and for making this tool!

@mttjj mttjj closed this as completed Jun 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants