Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8991065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:38:19+00:00 2026-06-15T22:38:19+00:00

When including gem ‘strong_parameters’ gem ‘rails-api’ together in my Gemfile , calling params.require like

  • 0

When including

gem 'strong_parameters'
gem 'rails-api'

together in my Gemfile, calling params.require like

private
  def user_params
    params.require(:user).permit(:first_name, :last_name)
  end

fails with the following error on the require() call.

TypeError:
   can't convert Symbol into String

The backtrace shows strong_parameters‘ ActionController::StrongParameters‘ require() method is never hit.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:38:21+00:00Added an answer on June 15, 2026 at 10:38 pm

    I spent too long on this one, so I figured I’d share here to hopefully save someone else a bit of time.

    The error above comes from the require() method in ActiveSupport::Dependencies::Loadable being executed when calling

    params.require(:user)...
    

    strong_parameters injects ActionController::StrongParameters into ActionController::Base at the bottom of this file with

    ActionController::Base.send :include, ActionController::StrongParameters
    

    The rails-api gem requires your app’s ApplicationController extend ActionController::API in favor of ActionController::Base

    The application controllers don’t know anything about ActionController::StrongParameters because they’re not extending the class ActionController::StrongParameters was included within. This is why the require() method call is not calling the implementation in ActionController::StrongParameters.

    To tell ActionController::API about ActionController::StrongParameters is as simple as adding the following to a file in config/initializers.

    ActionController::API.send :include, ActionController::StrongParameters
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am including 'acts_as_rateable' gem in my Gemfile like this gem 'acts_as_rateable', :git =>
I have in my Gemfile including gem 'bootstrap-sass' and in app/assets/stylesheets/custom.css.scss I have at
I am using breadcrumbs_on_rails v1.0.1 in a Rails 2.3.10 app by including the gem
I am using Ruby on Rails 3.2.2 and the jQuery-Rails 2.0.2 gem (including the
I am using Ruby 1.9.2 and the Ruby on Rails v3.2.2 gem. I am
I'm just building a test suite for a legacy Rails app. The simplecov gem
I am trying to use the Paperclip gem on a Rails project so followed
I have updated all of my gems, including to Rails 3.2.8, prior to a
Trying to create an IMGKit instance in one of my Rails controllers: def wkhtmltoimage
I've followed the instructions on http://geryit.com/blog/2011/01/installing-mysql-with-rails-on-mac-os-x-snow-leopard/ , including the installation of ruby via macport.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.