PG::UndefinedTable: ERROR: relation “active_storage_blobs” does not exist

The active_storage_blobs table does not exist yet. You need to first run: rails active_storage:install This command will add 2 migrations for 2 tables: active_storage_attachments and active_storage_blobs. These new migrations need to be run before the migrations you have above. There is a trick for this, you can consider manually changing the timestamp in the filenames … Read more

Is the ‘Travel’ time helper not available in feature specs?

In order to use these helpers you have to include them into your tests. You can do this by either including it into single test suite: describe MyClass do include ActiveSupport::Testing::TimeHelpers end or globally: RSpec.configure do |config| config.include ActiveSupport::Testing::TimeHelpers end

Relation passed to #or must be structurally compatible. Incompatible values: [:references]

There is a known issue about it on Github. According to this comment you might want to override the structurally_incompatible_values_for_or to overcome the issue: def structurally_incompatible_values_for_or(other) Relation::SINGLE_VALUE_METHODS.reject { |m| send(“#{m}_value”) == other.send(“#{m}_value”) } + (Relation::MULTI_VALUE_METHODS – [:eager_load, :references, :extending]).reject { |m| send(“#{m}_values”) == other.send(“#{m}_values”) } + (Relation::CLAUSE_METHODS – [:having, :where]).reject { |m| send(“#{m}_clause”) == other.send(“#{m}_clause”) … Read more

How to fix Rails’s warning messages with Ruby 2.7.0

To suppress warnings like: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call For now, simply prefix/pass the RUBYOPT environment variable to your rails commands: RUBYOPT=’-W:no-deprecated -W:no-experimental’ rails server or RUBYOPT=’-W:no-deprecated -W:no-experimental’ rails db:migrate This may not work with earlier versions of ruby. For backward compatibility … Read more

What is the use of secret_key_base in rails 4

The secret_token.rb file’s content includes a long randomized string which is used to verify the integrity of signed cookies (such as user sessions when people are signed into your web app). Documentation says: Use your existing secret_key_base from the secret_token.rb initializer to set the SECRET_KEY_BASE environment variable for whichever users run the Rails app in … Read more

Your bundle is locked to mimemagic (0.3.5), but that version could not be found in any of the sources listed in your Gemfile [duplicate]

Few days ago, the mimemagic versions were yanked. More info can be found at: https://github.com/rails/rails/issues/41750 https://rubygems.org/gems/mimemagic/versions You can modify your Gemfile as below: gem ‘mimemagic’, github: ‘mimemagicrb/mimemagic’, ref: ’01f92d86d15d85cfd0f20dabd025dcbd36a8a60f’

Upgraded Rails to 6, getting Blocked host Error

The Blocked Host is a new feature of Rails 6. You can add this pattern to your config/environments/development.rb to have no worries of that in case of dynamic urls config.hosts << /[a-z0-9]+\.c9users\.io/ Also for ngrok user, just replace above c9users by ngrok Update: ngrok is currently using – and . as subdomain in their URLs … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)