Issue in generate brick:models
selamar opened this issue · 2 comments
Hi lorint, trying to generate models I get
/usr/local/bundle/gems/brick-1.0.131/lib/generators/brick/models_generator.rb:65:in block (2 levels) in brick_models': undefined method
exists?' for Dir:Class (NoMethodError)
Dir.mkdir(dir) unless Dir.exists?(dir)
^^^^^^^^
Did you mean? exist?
from /usr/local/bundle/gems/brick-1.0.131/lib/generators/brick/models_generator.rb:63:in each' from /usr/local/bundle/gems/brick-1.0.131/lib/generators/brick/models_generator.rb:63:in
block in brick_models'
from /usr/local/bundle/gems/brick-1.0.131/lib/generators/brick/models_generator.rb:52:in each' from /usr/local/bundle/gems/brick-1.0.131/lib/generators/brick/models_generator.rb:52:in
brick_models'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/command.rb:27:in run' from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:127:in
invoke_command'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:134:in block in invoke_all' from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:134:in
each'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:134:in map' from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:134:in
invoke_all'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/group.rb:232:in dispatch' from /usr/local/bundle/gems/thor-1.2.1/lib/thor/base.rb:485:in
start'
from /usr/local/bundle/gems/railties-7.0.4.3/lib/rails/generators.rb:263:in invoke' from /usr/local/bundle/gems/railties-7.0.4.3/lib/rails/commands/generate/generate_command.rb:26:in
perform'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor/command.rb:27:in run' from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:127:in
invoke_command'
from /usr/local/bundle/gems/thor-1.2.1/lib/thor.rb:392:in dispatch' from /usr/local/bundle/gems/railties-7.0.4.3/lib/rails/command/base.rb:87:in
perform'
from /usr/local/bundle/gems/railties-7.0.4.3/lib/rails/command.rb:48:in invoke' from /usr/local/bundle/gems/railties-7.0.4.3/lib/rails/commands.rb:18:in
from internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb:37:in
require' from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in
require'from /usr/local/bundle/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in
require' from bin/rails:4:in
'
I found some reference online to use File.exists instead.
Bye
Sergio