I\'ve tried a number of things like uninstalling/reinstalling rails and gems but to no avail.
When I go into my new project and run rails s or bundle exec rails serv
I got this error by trying to update rails 4 and imagemagick and rmagick. So I just ran
gem uninstall rmagick
Select the All Versions option. Then try again
EDIT: This happaned again with me just now because I tried to use a gem without installing the required base gem. In my case the solution was to install 'omniauth-google' before trying to use 'omniauth-google-oauth2', but because I didn't install I got the same error again