komposable / komponent

An opinionated way of organizing front-end code in Ruby on Rails, based on components
http://komponent.io
MIT License
428 stars 31 forks source link

bin/rails stats doesn't run anymore #151

Closed nicolas-brousse closed 5 years ago

nicolas-brousse commented 5 years ago

bin/rails stats are failing on my application.

I've the following error:

% bin/rails stats --trace
** Invoke stats (first_time)
** Invoke spec:statsetup (first_time)
** Execute spec:statsetup
** Invoke komponent:statsetup (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute komponent:statsetup
** Execute stats
rails aborted!
Errno::ENOENT: No such file or directory @ dir_initialize - /Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/bundler/gems/komponent-eb4267b40f92/frontend/components
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/code_statistics.rb:44:in `open'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/code_statistics.rb:44:in `foreach'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/code_statistics.rb:44:in `calculate_directory_statistics'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/code_statistics.rb:38:in `block in calculate_statistics'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/code_statistics.rb:38:in `map'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/code_statistics.rb:38:in `calculate_statistics'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/code_statistics.rb:19:in `initialize'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/tasks/statistics.rake:34:in `new'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/tasks/statistics.rake:34:in `block in <main>'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.0/lib/rake/task.rb:280:in `block in execute'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.0/lib/rake/task.rb:280:in `each'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.0/lib/rake/task.rb:280:in `execute'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.0/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.0/lib/rake/task.rb:198:in `invoke_with_call_chain'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.0/lib/rake/task.rb:187:in `invoke'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.0/lib/rake/application.rb:160:in `invoke_task'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.0/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.0/lib/rake/application.rb:116:in `each'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.0/lib/rake/application.rb:116:in `block in top_level'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.0/lib/rake/application.rb:125:in `run_with_threads'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.0/lib/rake/application.rb:110:in `top_level'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.0/lib/rake/application.rb:186:in `standard_exception_handling'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/command.rb:48:in `invoke'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/railties-6.0.1/lib/rails/commands.rb:18:in `<main>'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.1/lib/active_support/dependencies.rb:325:in `block in require'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.1/lib/active_support/dependencies.rb:291:in `load_dependency'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.1/lib/active_support/dependencies.rb:325:in `require'
/Users/nicolas/Projects/application/bin/rails:9:in `<top (required)>'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `load'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `call'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/spring-2.1.0/lib/spring/client.rb:30:in `run'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/spring-2.1.0/bin/spring:49:in `<top (required)>'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `load'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `<top (required)>'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/nicolas/Projects/application/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Tasks: TOP => stats

I've executed Rails.application.config.komponent.component_paths in a test rake task, and it returns me the following:

[#<Pathname:/Users/nicolas/Projects/application/frontend/components>, #<Pathname:/Users/nicolas/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/bundler/gems/komponent-eb4267b40f92/frontend/components>]