bridgetownrb / bridgetown

A next-generation progressive site generator & fullstack framework, powered by Ruby
https://www.bridgetownrb.com
MIT License
1.11k stars 114 forks source link

Issue with Resource API following #778 #851

Closed jclusso closed 4 months ago

jclusso commented 4 months ago

Calling add_resource in a site builder results in the following error since #778 was merged.

bridgetown-core/lib/bridgetown-core/front_matter/ruby.rb:12:in `initialize': wrong number of arguments (given 1, expected 0) (ArgumentError)

To Reproduce

Create a builder like below.

class Builders::MyBuilder < SiteBuilder

  def build
    add_resource(:page, "page.html") do
      title "title"
    end
  end

end

@michaelherold do you have an ideas? I'm currently looking into what might be the reason.

jclusso commented 4 months ago

Nevermind. This ended up being some wierd issue from bundling my own fork locally and after running bundle update bridgetown instead of bundle update bridgetown-core a bunch of stuff got updated and this issue went away.

❯ bundle update bridgetown
Fetching https://github.com/jclusso/bridgetown.git
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using rack 2.2.8.1 (was 2.2.8)
Using faraday-net_http 3.1.0 (was 3.0.2)
Using public_suffix 5.0.4 (was 5.0.3)
Using faraday 2.9.0 (was 2.7.10)
Using addressable 2.8.6 (was 2.8.4)
Using tilt 2.3.0 (was 2.2.0)
Using ffi 1.16.3 (was 1.15.5)
Using roda 3.77.0 (was 3.70.0)
Bundle updated!