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

Breaks if sass-rails is not present #22

Closed
pcriv opened this issue Jun 21, 2018 · 11 comments · Fixed by #26
Closed

Breaks if sass-rails is not present #22

pcriv opened this issue Jun 21, 2018 · 11 comments · Fixed by #26
Labels

Comments

@pcriv
Copy link

pcriv commented Jun 21, 2018

Description

On an application i have, we are mainly not using the asset pipeline and we use the webpacker gem instead. (webpack)
So that's why we don't have sass-rails on our Gemfile.

Adding the gem fixes the issue but maybe this gem should require it?

@markets
Copy link
Owner

markets commented Jun 21, 2018

Hi @pablocrivella and thanks for reporting!

You're totally right, sass-rails should be an explicit dependency of Maily.

@markets markets added the bug label Jun 21, 2018
@pcriv
Copy link
Author

pcriv commented Jun 21, 2018

FYI: I also had to add maily/logo.png to:

Rails.application.config.assets.precompile += %w[maily/logo.png]

@markets
Copy link
Owner

markets commented Jun 21, 2018

@pablocrivella I just pushed a branch (#23) to fix this, will ping you when this is ready, thanks!

@markets
Copy link
Owner

markets commented Jun 21, 2018

@pablocrivella v0.7.1 (diff) released 🚀 fixing this stuff. Let me know if this version works for your app with webpacker. Thanks!

RubyGems: https://rubygems.org/gems/maily/versions/0.7.1

@pcriv
Copy link
Author

pcriv commented Jun 22, 2018

Now i'm getting the following error.

Showing /Users/pablocrivella/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/maily-0.7.1/app/views/layouts/maily/application.html.erb where line #5 raised:

File to import not found or unreadable: maily/normalize.
Load paths:
  /Users/pablocrivella/Workspace/Inspire/Ruby/NanaBackend/app/assets/stylesheets
  /Users/pablocrivella/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/maily-0.7.1/app/assets/images
  /Users/pablocrivella/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/maily-0.7.1/app/assets/javascripts
  /Users/pablocrivella/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/maily-0.7.1/app/assets/stylesheets
  /Users/pablocrivella/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/foundation_emails-2.2.1.0/vendor/assets/stylesheets
  /Users/pablocrivella/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/actioncable-5.2.0/lib/assets/compiled
  /Users/pablocrivella/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activestorage-5.2.0/app/assets/javascripts
  /Users/pablocrivella/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/actionview-5.2.0/lib/assets/compiled

Works after adding sass-rails again to the Gemfile

@pcriv
Copy link
Author

pcriv commented Jun 22, 2018

@markets Maybe we should re-open this issue?

@markets
Copy link
Owner

markets commented Jun 22, 2018

Yep, will look into this again.

@markets markets reopened this Jun 22, 2018
@markets
Copy link
Owner

markets commented Jun 22, 2018

@pablocrivella could you please share more info about your setup? Rails 5.2.0 with webpacker without sass-rails? Would be really helpful to have a sample app that reproduces the error.

@pcriv
Copy link
Author

pcriv commented Jun 22, 2018

Just some of the relevant gems:

ruby "2.5.1"

gem "rails", "~> 5.2.0"

gem "bootsnap", ">= 1.1.0", require: false
gem "foundation_emails"
gem "inky-rb", require: "inky"
gem "komponent"
gem "pg", ">= 0.18", "< 2.0"
gem "premailer-rails"
gem "rails-i18n", "~> 5.1"
gem "slim-rails"
gem "webpacker"

@markets markets mentioned this issue Jun 22, 2018
3 tasks
markets added a commit that referenced this issue Jun 22, 2018
- Fix (and improve) generator. Closes #24.
- Implement changes to allow slim (and haml, ...) templates edition. Closes #25.
- Definitive fix for newer apps with webpacker. Closes #22.
@markets
Copy link
Owner

markets commented Jun 22, 2018

@pablocrivella finally fixed (I hope) in v0.7.2 :)

@pcriv
Copy link
Author

pcriv commented Jun 23, 2018

Fix confirmed! Thanks @markets Awesome job!! 🎉

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

Successfully merging a pull request may close this issue.

2 participants