Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `marshal_dump' #88

Closed
NehaPeer opened this issue Jan 18, 2022 · 5 comments
Closed

undefined method `marshal_dump' #88

NehaPeer opened this issue Jan 18, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@NehaPeer
Copy link

We use below ruby and rails version -

Ruby 2.7.3 Rails 6.1.3.2

While creating a new user it throws the below error -

#<NoMethodError: undefined method `marshal_dump' for #ActiveModel::Errors:0x00007fecf40576f0
Did you mean? marshal_load>

but id didnt use marshal_dump method anywhere in project

Below Create method defined in the controller -

def create

@user = User.new(user_params)

respond_to do |format|
if @user.save
format.html { redirect_to @user, notice: 'User successfully created.' }
format.json { render :show, status: :created, location: @user }
else
format.html { render :new }
format.json { render json: @user.errors, status: :unprocessable_entity }
end
end
end

private

def user_params
  params.require(:user).permit(:name, :email_id, :status)
end
@caseyprovost
Copy link

This is a pre-existing bug from Amazing Print (we see it at my day job). It's because under the covers the library is calling marshal_dump on something that (likely stopped somewhat recently) responding to that method.

@caseyprovost
Copy link

You can see more history: awesome-print/awesome_print#413

@HarlemSquirrel HarlemSquirrel added bug Something isn't working help wanted Extra attention is needed labels Jul 1, 2022
@HarlemSquirrel
Copy link
Member

I found this PR which claims to fix the issue but the specs are not reproducing the issue for me.

Can someone reproduce this in a spec or code snippet?

@HarlemSquirrel
Copy link
Member

HarlemSquirrel commented Jul 1, 2022

I think this has been fixed in Amazing Print since #68 with version 1.3.0

@HarlemSquirrel HarlemSquirrel removed the help wanted Extra attention is needed label Jul 1, 2022
@HarlemSquirrel
Copy link
Member

Stale now so closing this. Please let me know if this is still happening with latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants