0

Note- there are some other questions that seem to ask the same thing, but the solutions there dont work for me. So this is a bit different.

I'm trying to go through a tutorial on active storage

https://edgeguides.rubyonrails.org/active_storage_overview.html

I'm on MacOS

I do rails new blahapp cd blahapp so a fresh rails application.

I get the error

Don't know how to build task 'active_storage:install'

Is saw these questions rails active_storage:install IS NOT WORKING and https://github.com/rails/activestorage/tree/archive#installation

I tried what's there and it's still not working, i'll elaborate..

I then tried adding gem "activestorage" to Gemfile, and did bundle install

Same error

I then tried opening the file config/application.rb and adding the line require "active_storage" Then the error changed a little bit

It said "Don't know how to build task 'active_storage:install'.......... did you mean? activestorage:install

So, even though the guide says rails active_storage:install I tried rails activestorage:install and it said

"Made storage and tmp/storage directories for development and testing.  
Copied default configuration to config/storage_serivces.ymp
rails aborted.
Errno::ENOENT: No such file or directory @ rb_sysopen - /Users/apple/blahapp/db/migrate/.............active_storage_create_tables.rb
barlop
  • 12,887
  • 8
  • 80
  • 109

1 Answers1

3

Since active storage was introduced in Rails 5.2, you need to be using that version for it to work. Try running "gem install rails" or (see full update instructions here) then creating a new app and following the instructions as usual.

rosalynnas
  • 414
  • 7
  • 18
  • thanks, I just tried editing Gemfile and changing the rails version to 5.2.0 , did bundle update, then the rails active_storage:install gave no error. – barlop Jul 28 '18 at 00:45