-
Notifications
You must be signed in to change notification settings - Fork 70
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
After chapter 7, 12 tests fail #19
Comments
@enilsen16 can you give me more details about the |
I'm using my entire gemfile:
The repository can be found here: https://github.com/enilsen16/rails-devise-api Any idea what's up? |
@kurenn Hmm... ok git pull for the lastest code and then try. There should be 72 examples... I really appreciate your help troubleshooting 😄 |
Did it worked? |
No I still have these errors. I'll run through chapter 7 again, just to make sure I did everything right. |
I reproduce the error with your cloned repo, and I have similar issue. If you change your gem 'active_model_serializers', '0.8.3' |
@enilsen16 try @florentferry solution and let me know how it goes! |
@florentferry @kurenn Is it a syntax issue then with Now that I am using an older version everything passes. |
No, the problem comes from the gem itself and/or dependencies with Rails 4.2 and RSpec 3. I check in active_model_serializers and find |
Hi, This [version 0.10.0] is not backward compatible with 0.9.0 or 0.8.0. |
I was having the same problems and after having changed active_model_serializers to 0.8.3, as your suggestion, solved them. I has caused problems on PRAX too: its Linux process was crashing. It's ok now. Having read the console RSpec's output of the tests, it seems the version of active_model_serializers I had before caused some infinite loop and crashed. The output, may it be important: ~/projects/marketplaceapi$ bundle exec rspec spec/controllers/api/v1/products_controller_spec.rb Failures:
Finished in 2.33 seconds Failed examples: rspec ./spec/controllers/api/v1/products_controller_spec.rb:97 # Api::V1::ProductsController POST #create when is successfully created renders the json representation for the product record just created Randomized with seed 55815 |
I have exactly the same thing as @pedrovcenteno . Reading the DEPRECATION WARNING: I wonder then : does it still a good solution to use the embed ids and the old version of the gem or should we use something different such as the 'meta attribute' solution suggested by @kurenn in Box 7.2 ? |
@RobinCaroff I would say it's fine as long you don't update to version 0.10, otherwise it will cause problems. It is a good solution, the only thing with version 0.10 is that uses the new JSON API standard http://jsonapi.org/ but at the end of the day you choose how you want to structure the JSON response. |
Hi, I just solve the problem, it's just the change of GET request syntax. You don't need rollback to old version active_model_serializers. Hope it is helpful. Good luck. |
@RobinCaroff can you try with @AdamYang121's solution? |
@shogmar Were you able to keep moving forward? |
Yes, I changed the version to 0.8.3 |
Glad to read it! |
After spending a few hours troubleshooting, I'm stuck. I followed along with the book except to change the class level
embed: :ids
to embed on association. I even tried cloning this repo down and I still have these errors. Am I missing something @kurenn?The text was updated successfully, but these errors were encountered: