在将Rails应用程序部署到Heroku时遇到了麻烦-它正在本地运行。
从Rails控制台收到以下错误:
1:来自/app/vendor/bundle/ruby/2.5.0/gems/activestorage-5.2.1/app/models/active_storage/blob/representable.rb:7:in
block in <module:Representable>' /app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/dynamic_matchers.rb:22:in
method_missing': #(NoMethodError)的未定义方法“ has_one_attached”
我没有在该项目中使用数据库,而是将sqlite3移至此处-
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
gem 'sqlite3'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'chromedriver-helper'
end