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

Fix makefile #5

Open
wants to merge 5 commits into
base: gh-pages
Choose a base branch
from
Open

Fix makefile #5

wants to merge 5 commits into from

Conversation

thet
Copy link
Member

@thet thet commented Jan 13, 2023

make stamp-bundler was removed. Now it's back.
Also, make jekyll did not work for me as the bundle binary wasn't found. Now it's path is explicitly set.

@cillianderoiste
Copy link
Member

@thet I'm afraid this isn't working for me yet. I tried running make clean and removing the .bundle directory. Simply running make is not enough to install bundle. If I make stamp-bundler a dependency of jekyll then it does attempt to build i.e.:

build: jekyll
jekyll: stamp-bundler
        $(BUNDLE) exec jekyll build

However, it then fails at:

.bundle/bin/bundle exec jekyll build
/nix/store/h3kc2i0z93k5pnb6gsl6678yvgaci708-ruby-2.6.5/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1186: warning: already initialized constant Bundler::FileUtils::Entry_::S_IF_DOOR
/srv/unibw-py3/.gem/ruby/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1284: warning: previous definition of S_IF_DOOR was here
/nix/store/h3kc2i0z93k5pnb6gsl6678yvgaci708-ruby-2.6.5/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1444: warning: already initialized constant Bundler::FileUtils::Entry_::DIRECTORY_TERM
/srv/unibw-py3/.gem/ruby/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1568: warning: previous definition of DIRECTORY_TERM was here
/nix/store/h3kc2i0z93k5pnb6gsl6678yvgaci708-ruby-2.6.5/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1499: warning: already initialized constant Bundler::FileUtils::OPT_TABLE
/srv/unibw-py3/.gem/ruby/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1626: warning: previous definition of OPT_TABLE was here
/nix/store/h3kc2i0z93k5pnb6gsl6678yvgaci708-ruby-2.6.5/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1553: warning: already initialized constant Bundler::FileUtils::LOW_METHODS
/srv/unibw-py3/.gem/ruby/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1685: warning: previous definition of LOW_METHODS was here
/nix/store/h3kc2i0z93k5pnb6gsl6678yvgaci708-ruby-2.6.5/lib/ruby/2.6.0/bundler/vendor/fileutils/lib/fileutils.rb:1560: warning: already initialized constant Bundler::FileUtils::METHODS
/srv/unibw-py3/.gem/ruby/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/fileutils/lib/fileutils.rb:1692: warning: previous definition of METHODS was here
bundler: failed to load command: jekyll (/srv/unibw-py3/unibw/unibw.buildout.plone/src/unibw.theme/prototype/.bundle/ruby/2.6.0/bin/jekyll)
ArgumentError: Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered
  /nix/store/h3kc2i0z93k5pnb6gsl6678yvgaci708-ruby-2.6.5/lib/ruby/2.6.0/bundler/errors.rb:9:in `status_code'
  /nix/store/h3kc2i0z93k5pnb6gsl6678yvgaci708-ruby-2.6.5/lib/ruby/2.6.0/bundler/errors.rb:20:in `<class:GemfileError>'
  /nix/store/h3kc2i0z93k5pnb6gsl6678yvgaci708-ruby-2.6.5/lib/ruby/2.6.0/bundler/errors.rb:20:in `<module:Bundler>'
  /nix/store/h3kc2i0z93k5pnb6gsl6678yvgaci708-ruby-2.6.5/lib/ruby/2.6.0/bundler/errors.rb:3:in `<top (required)>'
  /nix/store/h3kc2i0z93k5pnb6gsl6678yvgaci708-ruby-2.6.5/lib/ruby/2.6.0/bundler.rb:10:in `require'
  /nix/store/h3kc2i0z93k5pnb6gsl6678yvgaci708-ruby-2.6.5/lib/ruby/2.6.0/bundler.rb:10:in `<top (required)>'
  /srv/unibw-py3/unibw/unibw.buildout.plone/src/unibw.theme/prototype/.bundle/ruby/2.6.0/gems/jekyll-3.9.0/lib/jekyll/plugin_manager.rb:48:in `require'
  /srv/unibw-py3/unibw/unibw.buildout.plone/src/unibw.theme/prototype/.bundle/ruby/2.6.0/gems/jekyll-3.9.0/lib/jekyll/plugin_manager.rb:48:in `require_from_bundler'
  /srv/unibw-py3/unibw/unibw.buildout.plone/src/unibw.theme/prototype/.bundle/ruby/2.6.0/gems/jekyll-3.9.0/exe/jekyll:11:in `<top (required)>'
  /srv/unibw-py3/unibw/unibw.buildout.plone/src/unibw.theme/prototype/.bundle/ruby/2.6.0/bin/jekyll:23:in `load'
  /srv/unibw-py3/unibw/unibw.buildout.plone/src/unibw.theme/prototype/.bundle/ruby/2.6.0/bin/jekyll:23:in `<top (required)>'
make: *** [Makefile:40: jekyll] Error 1

Perhaps I need a newer version of ruby, or something like that? My container has ruby 2.6.5.

@thet
Copy link
Member Author

thet commented Jan 17, 2023

@cillianderoiste I've added more changes:

  • the stamp-bundler target as a dependency of jekyll
  • the .bundle directory is removed when calling make clean
  • all bower references are removed - we're using npm only.

Can you please try with a newer Ruby version?‌
For me it works with:

ruby --version
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux-gnu]

Since I did not change the Gemfile or Gemfile.lock I actually think this error is unrelated to my changes here.

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

Successfully merging this pull request may close these issues.

2 participants