jemcode / rails_admin_actiontext Goto Github PK
View Code? Open in Web Editor NEWActionText (Trix editor) support for rails_admin
Home Page: https://rubygems.org/gems/rails_admin_actiontext
License: MIT License
ActionText (Trix editor) support for rails_admin
Home Page: https://rubygems.org/gems/rails_admin_actiontext
License: MIT License
Bundler could not find compatible versions for gem "rails_admin":
In Gemfile:
rails_admin (~> 2.0)
rails_admin_actiontext was resolved to 0.0.2, which depends on
rails_admin (>= 1.0.0, ~> 1.0)
Could this be corrected please?
Hi there,
After setting up actiontext and activestorage, I added this gem to our app. However, when adding :actiontext to our :body attribute, I get this error:
couldn't find file 'trix/dist/trix' with type 'text/css'
Checked in these paths:
/Users/vnguyen/git/Oumuamua/app/assets/config
/Users/vnguyen/git/Oumuamua/app/assets/images
/Users/vnguyen/git/Oumuamua/app/assets/stylesheets
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/rails_admin_actiontext-0.0.3/app/assets/javascripts
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/rails_admin_actiontext-0.0.3/app/assets/stylesheets
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/rails_admin-2.0.2/app/assets/images
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/rails_admin-2.0.2/app/assets/javascripts
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/rails_admin-2.0.2/app/assets/stylesheets
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/rails_admin-2.0.2/vendor/assets/fonts
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/rails_admin-2.0.2/vendor/assets/images
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/rails_admin-2.0.2/vendor/assets/javascripts
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/rails_admin-2.0.2/vendor/assets/stylesheets
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/remotipart-1.4.4/vendor/assets/javascripts
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/nested_form-0.3.2/vendor/assets/javascripts
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/jquery-ui-rails-6.0.1/app/assets/images
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/jquery-ui-rails-6.0.1/app/assets/javascripts
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/jquery-ui-rails-6.0.1/app/assets/stylesheets
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/jquery-rails-4.4.0/vendor/assets/javascripts
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/actioncable-6.0.3.1/app/assets/javascripts
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/activestorage-6.0.3.1/app/assets/javascripts
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/actionview-6.0.3.1/lib/assets/compiled
/Users/vnguyen/.rvm/gems/ruby-2.7.1/gems/turbolinks-source-5.2.0/lib/assets/javascripts
Extracted source (around line #1):
//= require trix/dist/trix
//= require actiontext
I found this article:
rails/actiontext#40 (comment)
So I tried to add the following file (config/assets.rb):
# config/initializers/assets.rb
Rails.application.config.assets.paths << Rails.root.join('node_modules')
I've tried just manually installing actiontext to rails_admin without the gem, and can't quite figure out how to get it to load into a text field.
Any help on why it can't find the trix file?
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.