title: Unable to autoload constant ActiveStorage::Blob::Analyzable
body: <p>I looked at every possible solution regarding this error but nothing solved it.</p>
  
  <p>Every time I try to upload an image, I receive this error:</p>
  
  <p><code>Unable to autoload constant ActiveStorage::Blob::Analyzable, expected /usr/local/lib/ruby/gems/2.5.0/gems/activestorage-5.2.2/app/models/active_storage/blob/analyzable.rb to define it</code>.</p>
  
  <p><strong>Gemfile</strong></p>
  
  <pre><code>source 'https://rubygems.org'
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
  
  ruby '2.5.1'
  
  gem 'rails', '~&gt; 5.2.0'
  gem 'mysql2', '&gt;= 0.4.4', '&lt; 0.6.0'
  gem 'puma', '~&gt; 3.11'
  gem 'sass-rails', '~&gt; 5.0'
  gem 'uglifier', '&gt;= 1.3.0'
  # See https://github.com/rails/execjs#readme for more supported runtimes
  # gem 'mini_racer', platforms: :ruby
  
  gem 'turbolinks', '~&gt; 5'
  gem 'jbuilder', '~&gt; 2.5'
  # Use Redis adapter to run Action Cable in production
  # gem 'redis', '~&gt; 4.0'
  # Use ActiveModel has_secure_password
  gem 'bcrypt', '~&gt; 3.1.7'
  
  # Use ActiveStorage variant
  # gem 'mini_magick', '~&gt; 4.8'
  
  # Use Capistrano for deployment
  # gem 'capistrano-rails', group: :development
  
  # Reduces boot times through caching; required in config/boot.rb
  # Causing crashes. Removing for now
  # gem 'bootsnap', '&gt;= 1.1.0', require: false
  
  # Well maintained fork with several patches and compatability for Rails 5.x
  # If we need to we can fork this and take ownership of it. Much better than building from scratch.
  # gem 'casino', git: "https://github.com/identification-io/CASino.git", branch: "master"
  gem 'casino', git: "https://github.com/webappsllc/CASino.git", branch: "master"
  # gem 'casino', path: '/Users/justin/dev/oss/CASino'
  gem 'grape', '~&gt; 1.1.0' # Pinned
  
  gem 'wisper', '~&gt; 2.0'
  gem 'rack-cors', require: 'rack/cors'
  
  # Form Objects
  gem "reform", "&gt;= 2.2.0"
  gem "reform-rails"
  gem "dry-validation"
  
  # Free optimization
  gem 'fast_blank'
  
  # Hashids to obscure legacy_ids
  gem 'hashids'
  
  # Send Emails via Amazon SES
  gem 'aws-sdk-rails'
  
  # Upload Files via Amason S3
  gem "aws-sdk-s3", require: false
  
  group :development, :test do
    # Call 'byebug' anywhere in the code to stop execution and get a debugger console
    gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
    gem 'guard-rspec', require: false
    gem 'dotenv-rails', require: 'dotenv/rails-now'
    gem 'spring-commands-rspec'
    gem 'parallel_tests', group: [:development, :test]
  end
  
  group :development do
    # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
    gem 'web-console', '&gt;= 3.3.0'
    gem 'listen', '&gt;= 3.0.5', '&lt; 3.2'
    # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
    gem 'spring'
    gem 'spring-watcher-listen', '~&gt; 2.0.0'
    gem 'grape_on_rails_routes'
    gem "better_errors"
    gem "binding_of_caller"
    gem "letter_opener"
    gem 'letter_opener_web', '~&gt; 1.0'
  end
  
  group :test do
    # Adds support for Capybara system testing and selenium driver
    gem 'capybara', '&gt;= 2.15', '&lt; 4.0'
    gem 'selenium-webdriver'
    # Easy installation and use of chromedriver to run system tests with Chrome
    gem 'chromedriver-helper'
    gem 'factory_bot'
    gem 'rspec'
    gem 'rspec-rails'
    gem 'database_cleaner'
    gem 'faker'
  end
  
  # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
  # gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
  </code></pre>
  
  <p>In <code>config/application.rb</code> I have <code>require 'active_storage/engine'</code> uncommented.</p>
  
  <p>In <code>config/environments/development.rb</code> I have <code>config.active_storage.service = :local</code> set up.</p>
  
  <p>I ran <code>rails active_storage:install</code> and <code>rails db:migrate</code>.</p>
  
  <p>The name of the model is <code>user_test</code></p>
  
  <pre><code>class UserTest &lt; ApplicationRecord
    has_one_attached :image
  end
  </code></pre>
  
  <p><strong>I have this in app/controllers/user_tests_controller.rb</strong></p>
  
  <pre><code>def user_test_params
    params.require(:user_test).permit(:title, :caption, :image)
  end 
  </code></pre>
  
  <p>**config/storage.yml*</p>
  
  <pre><code>test:
    service: Disk
    root: &lt;%= Rails.root.join("tmp/storage") %&gt;
  
  local:
    service: Disk
    root: &lt;%= Rails.root.join("storage") %&gt;
  </code></pre>
  
  <p>I am really clueless as to why it isn't working.</p>