tabler-rubygem
tabler-rubygem copied to clipboard
Error when using sassc-rails
Hi and many thanks for your work to build a Ruby gem for tabler UI.
I've started with a fresh Rails (5.2.2.1) app which uses sassc-rails instead of sass-railsdue to the deprecation warnings for sass.
When I start the (development) server with rails s I get the following error:
Traceback (most recent call last):
bin/rails: Bootsnap::LoadPathCache::FallbackScan
50: from bin/rails:3:in `<main>'
49: from bin/rails:3:in `load'
48: from /Users/<username>/<app path>/bin/spring:15:in `<top (required)>'
47: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
46: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
45: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
44: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
43: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
42: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
41: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
40: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
39: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
38: from /Users/<username>/<app path>/bin/rails:9:in `<top (required)>'
37: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:291:in `require'
36: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:257:in `load_dependency'
35: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:291:in `block in require'
34: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
33: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
32: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:83:in `register'
31: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
30: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
29: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/railties-5.2.2.1/lib/rails/commands.rb:18:in `<main>'
28: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/railties-5.2.2.1/lib/rails/command.rb:46:in `invoke'
27: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/railties-5.2.2.1/lib/rails/command/base.rb:65:in `perform'
26: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
25: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
24: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
23: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/railties-5.2.2.1/lib/rails/commands/server/server_command.rb:142:in `perform'
22: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/railties-5.2.2.1/lib/rails/commands/server/server_command.rb:142:in `tap'
21: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/railties-5.2.2.1/lib/rails/commands/server/server_command.rb:145:in `block in perform'
20: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:291:in `require'
19: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:257:in `load_dependency'
18: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/activesupport-5.2.2.1/lib/active_support/dependencies.rb:291:in `block in require'
17: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
16: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
15: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:83:in `register'
14: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
13: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
12: from /Users/<username>/<app path>/config/application.rb:18:in `<main>'
11: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bundler-2.0.1/lib/bundler.rb:114:in `require'
10: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:65:in `require'
9: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:65:in `each'
8: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:76:in `block in require'
7: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:76:in `each'
6: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
5: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:25:in `require'
4: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:36:in `rescue in require'
3: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
2: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:80:in `register'
1: from /Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/Users/<username>/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require': cannot load such file -- tabler-rubygem (LoadError)
I think this error originates from your require 'sass' statement in line 53 of the rubygem.rb file. Currently I use the following work around
gem 'sass-rails', '~> 5.0.7', require: false
gem 'sassc-rails', '~> 2.1.0'
Do you have any idea why this isn't working?
Many thanks..!
I haven't used this gem with sassc-rails. Please submit a pull request that enables compatibility with sassc-rails and sass-rails.
@railsmechanic
I'm thinking about trying to fix this because we just hit this issue as I wanted to remove ruby sass as it's EOL now.
@lightyrs what approach do you prefer? Checking sassc presence first and fallback to sass or can we just use sassc since sass isn't supported anymore? If we go with only using sassc then what do you think about including it as a dependency? I was surprised first that the gem is requiring and referencing sass but only as an implicit dependency :(
I'm thinking about trying to fix this because we just hit this issue as I wanted to remove ruby sass as it's EOL now.
@lightyrs what approach do you prefer? Checking sassc presence first and fallback to sass or can we just use sassc since sass isn't supported anymore? If we go with only using sassc then what do you think about including it as a dependency? I was surprised first that the gem is requiring and referencing sass but only as an implicit dependency :(
@vbalazs Ideally we would provide backwards compatibility (sassc fallback to sass), however, if sass isn't actually required as a dependency (and maybe it doesn't need to be), then getting rid of it would be the best approach (I think).
What is the purpose of this sass setup?
What do you think about adding boostrap gem as a runtime dependency (even the dummy rails app depends on it)? That already depends on sassc and everything seems to work if we remove that configure_sass piece of code and have the bootstrap gem included 🤔
What is the purpose of this sass setup?
What do you think about adding
boostrapgem as a runtime dependency (even the dummy rails app depends on it)? That already depends on sassc and everything seems to work if we remove thatconfigure_sasspiece of code and have the bootstrap gem included 🤔
That seems look a good plan @vbalazs.
Is there a work around this?
@alejandrodevs in the referenced closed PR, you can find some solutions
Why don't we merge this fix? https://github.com/lingokids/tabler-rubygem
@alejandrodevs I'm just curious about backwards-compatibility and it doesn't seem like the readme reflects anything about these changes.
@lightyrs what about having a new version with this fix and support the old one in another development line to for a while until we decided to stop supporting it. What do you think?
Honestly, I'd need someone else to help manage the project. I don't really use tabler anymore but I still see the value in this project. Any interest?