0

I've been having trouble deploying a rails app to Heroku - and it's working locally.

Receiving the following error from rails console:

1: from /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:inmethod_missing': undefined method `has_one_attached' for # (NoMethodError)

I'm not utilizing a db in this project, I moved sqlite3 here -

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
Jenny
  • 1
  • 2
  • Can you include more of the backtrace? Something is calling `has_one_attached`. – Nate Nov 04 '18 at 19:41
  • 1
    `has_one_attached` is an active_storage helper, I'll start diggin there (try gem install active_storage on the server to see if there's some error). I'm not sure why you posted the group test of your gems, it's not used for deploys. – arieljuod Nov 04 '18 at 20:12
  • 1
    I believe you might find a solution [disable active storage](https://stackoverflow.com/questions/49813214/disable-active-storage-in-rails-5-2) – Amr Adel Nov 04 '18 at 21:02

0 Answers0