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 local variable or method `acts_as_shopping_cart' - Rails 4 #17

Open
luismiv85 opened this issue Jul 3, 2014 · 4 comments
Open

Comments

@luismiv85
Copy link

I am using Rails 4 and I got this error:

undefined local variable or method `acts_as_shopping_cart' for #Class:0x0000000766b320

app/models/shopping_cart.rb:
class ShoppingCart < ActiveRecord::Base
acts_as_shopping_cart
end

Anyone could help me, I couldn't find any information about this error. :(

@dabit
Copy link
Contributor

dabit commented Jul 11, 2014

I just updated the example app with Rails 4.1.2

Can you take a look and see if you are missing something?

https://github.com/crowdint/acts_as_shopping_cart_app

@jdarnok
Copy link

jdarnok commented May 6, 2015

I had the same problem - restarting your app's server worked. Just another childish error ;)

@surupaTW
Copy link

I am also facing the same error.

It is working fine in development and staging environment. But getting "undefined local variable or method `acts_as_shopping_cart' for #Class:0x00000007741b28 (NameError)" in production environment.

Please help.

@sadaf2605
Copy link

Restarting the server solves my problem too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants