action text wont install on Rails 6.1.3.2 app

540 Views Asked by At

I have a new Rails 6.1.3.2 app with ActiveStorage configured that I'm attempting to install Action Text on. Every tutorial says to just run rails action_text:install and it will create the migration files but my install just hangs with no output or error messages.

This is what is shown in the console. Possibly there is an issue due to the identical bin/yarn message?

I also tried adding the actiontext gem to my gemfile but there was no change.

    rails  app:binstub:yarn
   identical  bin/yarn
Installing JavaScript dependencies
         run  /Users/me/.rbenv/versions/2.7.3/bin/ruby bin/yarn add trix@^1.2.0 @rails/actiontext@^6.1.3-2 from "."
1

There are 1 best solutions below

0
On

I ended up removing the gem hotwire-rails which was on version 0.1.3 and the migration file that it generates. Then I installed just ActiveStorage by running rails active_storage:install which generated 2 migration files. I decided to drop my database and recreate it because I didn't have much data. I then ran the migrations with rails db:migrate I think the key piece though was that I ran yarn upgrade-interactive --latest and then selected each package that needed to be upgraded. After that I was able to run rails action_text:install and it finally completed instead of just hanging. I believe it was either something to do with that hotwire-rails gem or the fact that my version of webpacker needed to be upgraded in package.json which was taken care of when I ran yarn upgrade-interactive --latest

       rails  app:binstub:yarn
   identical  bin/yarn
Installing JavaScript dependencies
         run  /Users/me/.rbenv/versions/2.7.3/bin/ruby bin/yarn add trix@^1.2.0 @rails/actiontext@^6.1.3-2 from "."
Adding trix to app/javascript/packs/application.js
      append  app/javascript/packs/application.js
Adding @rails/actiontext to app/javascript/packs/application.js
      append  app/javascript/packs/application.js
      create  app/assets/stylesheets/actiontext.scss
      create  app/views/active_storage/blobs/_blob.html.erb
       rails  railties:install:migrations FROM=active_storage,action_text
Copied migration 20210508155239_create_action_text_tables.action_text.rb from action_text
      invoke  test_unit
      create    test/fixtures/action_text/rich_texts.yml