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

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

Open
nikos83 opened this issue Mar 17, 2022 · 0 comments
Open

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

nikos83 opened this issue Mar 17, 2022 · 0 comments

Comments

@nikos83
Copy link

nikos83 commented Mar 17, 2022

Showing /Users/nikodemgorak/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/gems/rails_admin_actiontext-0.0.3/app/views/rails_admin/main/_form_actiontext.html.haml where line #1 raised:

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

I was trying to add the editor to rails admin.
package.json

{
  "license": "UNLICENSED",
  "dependencies": {
    "@babel/preset-react": "^7.13.13",
    "@hookform/error-message": "^2.0.0",
    "@popperjs/core": "^2.9.1",
    "@rails/actiontext": "^6.0.3-7",
    "@rails/activestorage": "^6.1.3-1",
    "@rails/ujs": "^6.1.3-1",
    "@rails/webpacker": "5.3.0",
    "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
    "bootstrap": "^5.0.0-beta3",
    "bootstrap-icons": "^1.8.1",
    "channels": "^0.0.4",
    "jquery": "^3.6.0",
    "moment": "^2.29.1",
    "prop-types": "^15.7.2",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-hook-form": "^7.6.4",
    "react_ujs": "^2.6.1",
    "trix": "^1.2.0",
    "turbolinks": "^5.2.0"
  },
  "devDependencies": {
    "webpack-dev-server": "^3.11.2"
  }
}

Trace of template inclusion: #<ActionView::Template /Users/nikodemgorak/.rbenv/versions/2.6.6/lib/ruby/gems/2.6.0/bundler/gems/rails_admin-7962a19469a7/app/views/rails_admin/main/new.html.haml locals=[]>

I've added assets.rb in the initializers folder with
Rails.application.config.assets.paths << Rails.root.join('node_modules')
Any ideas?

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

No branches or pull requests

1 participant