Today I Learned

Find real error messages in Rails

Today after messing with some gems I wanted to run rspec but i was getting strange error

  can't modify frozen Array

Failure/Error: require File.expand_path('../config/environment', __dir__)

I tried to find solution in Google but those weren’t working. I found that running bundle exec rails c reveals true error messages. In my case I got this after running this command:

JSONAPI: Could not find resource 'api/v1/creators'. (Class Api::V1::CreatorResource not found) (NameError)

And I was finally able to solve this problem :)