[英]rails active_storage:install gives error
注意-还有其他一些问题似乎在问同样的事情,但是那里的解决方案对我不起作用。 所以这有点不同。
我正在尝试阅读有关活动存储的教程
https://edgeguides.rubyonrails.org/active_storage_overview.html
我在MacOS上
我会用rails new blahapp
cd blahapp
因此是一个全新的rails应用程序。
我得到错误
Don't know how to build task 'active_storage:install'
看到了这些问题rails active_storage:install NOT WORKING和https://github.com/rails/activestorage/tree/archive#installation
我详细说明了那里的内容,但仍然无法正常工作。
然后,我尝试将gem "activestorage"
添加到Gemfile中,并进行捆绑安装
同样的错误
然后,我尝试打开文件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
由于活动存储是在Rails 5.2中引入的,因此您需要使用该版本才能工作。 尝试运行“ gem install rails”或(请参阅此处的完整更新说明),然后创建一个新应用并按照通常的说明进行操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.