pirati-web / jekyll-theme-pirati

Web desing of Czech Pirate Party
6 stars 17 forks source link

Error: wrong number of arguments (given 2, expected 1) #45

Closed hom3r closed 3 years ago

hom3r commented 4 years ago

Hi, I tried to run the project on macOS 10.14.6 with Ruby 2.5.1, but I ran into the following error when trying to serve the app.

$ bundle exec jekyll serve --watch --livereload
Configuration file: none
            Source: /Users/dejv/Dev/projects/jekyll-theme-pirati
       Destination: /Users/dejv/Dev/projects/jekyll-theme-pirati/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
jekyll 3.7.4 | Error:  wrong number of arguments (given 2, expected 1)

The problem persisted even when using docker. It seems the problem is with the version of sprockets.

Changing the line in Gemfile with sprockets version to ~> 3.7 seem to do the trick.

gem 'sprockets', '~> 3.7'

Also, I simply couldn't serve the app simply via jekyll, I had to run npm start, before which I had to replace the last Gemfile line

gem "therubyracer", "~> 0.12.3"

with the following line.

gem "mini_racer", "~> 0.2.8"
xaralis commented 4 years ago

This is caused by Gemfile.lock not being commited to the repository. The problem as far as I know is caused by bundler version - we need to stick to the 1.x line. We had similar issue on our company's website and bundler v2 was the cause. If the lockfile was commited, it would probably work because it contains BUNDLED WITH statement.