【发布时间】:2019-01-04 22:20:41
【问题描述】:
注意-还有一些其他问题似乎问同样的事情,但那里的解决方案对我不起作用。所以这有点不同。
我正在尝试学习有关主动存储的教程
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 IS 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
【问题讨论】:
-
你使用的是什么版本的 ruby / rails?
-
@rosalynn rails 5.1.6, Ruby 2.5.0p0
标签: ruby-on-rails macos rails-activestorage