将Rails应用程序部署到heroku时发生问题-Active Record NoMethodError

时间:2018-11-04 19:14:43

标签: ruby-on-rails ruby heroku activerecord nomethoderror

在将Rails应用程序部署到Heroku时遇到了麻烦-它正在本地运行。

从Rails控制台收到以下错误:

  

1:来自/app/vendor/bundle/ruby/2.5.0/gems/activestorage-5.2.1/app/models/active_storage/blob/representable.rb:7:inblock in <module:Representable>' /app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.1/lib/active_record/dynamic_matchers.rb:22:inmethod_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

0 个答案:

没有答案