jemcode / rails_admin_actiontext

ActionText (Trix editor) support for rails_admin
https://rubygems.org/gems/rails_admin_actiontext
MIT License
4 stars 4 forks source link

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

Open nikos83 opened 2 years ago

nikos83 commented 2 years ago

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?