注意-还有一些其他的问题似乎也问同样的问题,但那里的解决方案对我不起作用。所以这有点不同。
我正在尝试学习关于活动存储的教程
https://edgeguides.rubyonrails.org/active_storage_overview.html
我在MaOS上
我愿意
rails new blahapp
cd blahapp
一个全新的Rails应用程序。
我得到错误
Don't know how to build task 'active_storage:install'
看到这些问题了吗
rails active_storage:install IS NOT WORKING
和
https://github.com/rails/activestorage/tree/archive#installation
我试过那里的东西,但还是不起作用,我会详细说明……
然后我尝试添加
gem "activestorage"
到gemfile,并安装了bundle
相同误差
然后我试着打开文件
config/application.rb
并添加线条
require "active_storage"
然后错误改变了一点
它说
"Don't know how to build task 'active_storage:install'.......... did you mean? activestorage:install
所以,即使导游说
rails active_storage:install
我试过
rails activestorage:install
它说
"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