Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

activate :target without block results in an error #3

Closed
jtwalters opened this issue Feb 5, 2013 · 4 comments
Closed

activate :target without block results in an error #3

jtwalters opened this issue Feb 5, 2013 · 4 comments

Comments

@jtwalters
Copy link
Contributor

I get the following error when attempting to run middleman build:

lib/middleman-target/extension.rb:40:in `build_targets': undefined local variable or method `build_target_definitions' for #<Middleman::Application:0x70191144676020> (NameError)

Isn't the build target map block supposed to be optional?

@xunker
Copy link
Owner

xunker commented Feb 5, 2013

Yes, it is supposed to be optional. Could you please post your config.rb?

@jtwalters
Copy link
Contributor Author

Not sure if you need the whole thing (?) but the pertinent line from my config is

activate :target

If I change it to

activate :target do |t|
  t.build_targets = {}
end

then it seems to prevent the error.

@xunker
Copy link
Owner

xunker commented Feb 5, 2013

I will check on this. In the features I am using

activate :target

several time with no problems, though, so may be a deeper issue.

UPDATE: I've been using the Aruba gem to test, which calls 'middleman server'. With 'middleman build' I can cause this problem with Ruby 1.8.7.

xunker added a commit that referenced this issue Feb 5, 2013
@xunker
Copy link
Owner

xunker commented Feb 5, 2013

Good catch with that, made a change for this and pushed it to Rubygems as version 0.0.4.

@xunker xunker closed this as completed Feb 5, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants