Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using sassc-rails #13

Open
railsmechanic opened this issue Mar 16, 2019 · 11 comments
Open

Error when using sassc-rails #13

railsmechanic opened this issue Mar 16, 2019 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@railsmechanic
Copy link

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..!

@lightyrs lightyrs added the enhancement New feature or request label Mar 25, 2019
@lightyrs
Copy link
Owner

I haven't used this gem with sassc-rails.
Please submit a pull request that enables compatibility with sassc-rails and sass-rails.

@railsmechanic

@vbalazs
Copy link

vbalazs commented Apr 4, 2019

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 :(

@lightyrs
Copy link
Owner

lightyrs commented Apr 5, 2019

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).

@vbalazs
Copy link

vbalazs commented Apr 5, 2019

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 🤔

@lightyrs
Copy link
Owner

lightyrs commented Apr 5, 2019

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 🤔

That seems look a good plan @vbalazs.

@alejandrodevs
Copy link

Is there a work around this?

@vbalazs
Copy link

vbalazs commented Sep 25, 2019

@alejandrodevs in the referenced closed PR, you can find some solutions

@alejandrodevs
Copy link

Why don't we merge this fix?
https://github.com/lingokids/tabler-rubygem

@lightyrs
Copy link
Owner

@alejandrodevs I'm just curious about backwards-compatibility and it doesn't seem like the readme reflects anything about these changes.

@alejandrodevs
Copy link

alejandrodevs commented Oct 10, 2019

@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?

@lightyrs
Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants