Skip to content

ActionView::Template::Error (Unsupported command argument type: TrueClass) #699

@puneetpandey

Description

@puneetpandey

I am using split gem for my rails project and after performing below steps:

  • Added split to Gemfile
  • Added configuration block to config/environments/development.rb
Split.configure do |config|
  config.db_failover = true # handle Redis errors gracefully
  config.db_failover_on_db_error = -> (error) { Rails.logger.error(error.message) }
  config.enabled = true
  config.redis = Redis.new(host: "localhost")
end
  • Added below code block to my HAML view file:
- ab_test(:payment_button, "/images/amazonpay.png", "/images/apple-pay.png") do |button_file|
  = button_file

I am getting: ActionView::Template::Error (Unsupported command argument type: TrueClass)

I am using Memcache for datastore. So in my development.rb config file, I have config.cache_store = :mem_cache_store line. Even if I change it to use redis_cache_store nothing happens!

Here's my app info:

 % rails about
About your application's environment
Rails version             7.0.0
Ruby version              ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [arm64-darwin21]
RubyGems version          3.1.6
Rack version              2.2.3
JavaScript Runtime        Node.js (V8)
Middleware                Honeybadger::Rack::UserInformer, Honeybadger::Rack::UserFeedback, Honeybadger::Rack::ErrorNotifier, ActionDispatch::HostAuthorization, Rack::Sendfile, Rack::Cors, FontAssets::Middleware, ActionDispatch::Static, ActionDispatch::Executor, ActiveSupport::Cache::Strategy::LocalCache::Middleware, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, ActionDispatch::RemoteIp, Sprockets::Rails::QuietAssets, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::ActionableExceptions, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::Migration::CheckPending, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ContentSecurityPolicy::Middleware, ActionDispatch::PermissionsPolicy::Middleware, Rack::Head, Rack::ConditionalGet, Rack::ETag, Rack::TempfileReaper, Warden::Manager, Rack::Deflater, Rack::Maintenance, Rack::Tracker, Apipie::Extractor::Recorder::Middleware, JQuery::FileUpload::Rails::Middleware, Apipie::StaticDispatcher, ActionDispatch::Static
Application root          /Workspace/myApp
Environment               development
Database adapter          postgresql
Database schema version 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions