Skip to content
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.

couldn't find file 'trix/dist/trix' with type 'text/css' #40

Closed
gobijan opened this issue Nov 12, 2018 · 5 comments
Closed

couldn't find file 'trix/dist/trix' with type 'text/css' #40

gobijan opened this issue Nov 12, 2018 · 5 comments

Comments

@gobijan
Copy link

gobijan commented Nov 12, 2018

I just installed wanted to test drive Rails version: 6.0.0.alpha
(Ruby version: 2.5.3 (x86_64-darwin18)) and followed this guide to try out action text:
https://dev.to/adrienpoly/step-by-step-guide-to-test-rails-activetext-4b8o

Trix including image upload works but I have to throw out this line:

//= require trix/dist/trix

Otherwise I get the following error:

couldn't find file 'trix/dist/trix' with type 'text/css'
Checked in these paths:
/Users/bijan/Desktop/yabe/yabe6/app/assets/config
/Users/bijan/Desktop/yabe/yabe6/app/assets/images
/Users/bijan/Desktop/yabe/yabe6/app/assets/stylesheets
/Users/bijan/.asdf/installs/ruby/2.5.3/lib/ruby/gems/2.5.0/bundler/gems/rails-1cc46865ecfe/actioncable/app/assets/javascripts
/Users/bijan/.asdf/installs/ruby/2.5.3/lib/ruby/gems/2.5.0/bundler/gems/rails-1cc46865ecfe/activestorage/app/assets/javascripts
/Users/bijan/.asdf/installs/ruby/2.5.3/lib/ruby/gems/2.5.0/bundler/gems/rails-1cc46865ecfe/actionview/app/assets/javascripts
/Users/bijan/.asdf/installs/ruby/2.5.3/lib/ruby/gems/2.5.0/gems/turbolinks-source-5.2.0/lib/assets/javascripts

So Trix is unfortunately completely unstyled. Am I missing something?

@adrienpoly
Copy link

Hello

That is strange I haven't retested it for a while
here is a repo you can clone that for sure was working a few weeks ago: https://github.com/adrienpoly/yabe

If it is also broken let me know I will investigate the potential breaking changes of the latest commits

@gobijan
Copy link
Author

gobijan commented Nov 12, 2018

I downloaded your repo and it works. EDIT: hold up I try creating it from master instead of just checking out.

@gobijan
Copy link
Author

gobijan commented Nov 12, 2018

Generating a project from scratch and then following your guide still throws the same error.

@vividmuimui
Copy link

vividmuimui-sandbox/actiontext-sample@446df6c
I resolved same problem with this change.

# config/initializers/assets.rb

Rails.application.config.assets.paths << Rails.root.join('node_modules')

@fedeagripa
Copy link

vividmuimui-sandbox/actiontext-sample@446df6c
I resolved same problem with this change.

# config/initializers/assets.rb

Rails.application.config.assets.paths << Rails.root.join('node_modules')

Had same issue and worked like a charm, may this not be part of the configuration being done while running rails action_text:install ?

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

No branches or pull requests

5 participants