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
NameError: uninitialized constant PG #335
Comments
Can you share your PublicActivity config? The one you probably have in initializers |
I just checked, we do not have an initializer for PublicActivity. We are running ActiveRecord. It looks to me that the actual error can't propagate out of the function as the uninitialized constant error is shadowing the actual error. |
Mmm good catch, PG will not exist if the app is not using |
You also need to do that with Mysql2::Error::ConnectionError two lines below as not all apps may use Mysql. |
does it supports mongoid? I am getting uninitialized constant PG error |
When would this merged in master branch..? |
@zainonrails this has been released as 1.6.4. Can you try? I don't merge to master, I use separate branches for each stable version. |
@ashokmiryal it doesn't. Please post the exception you are getting or submit a PR which adds a clause for Mongoid exception in a similar way to how PG/Mysql are handled: 83d1406 |
So upgrading the gem would also solve this as right now i am using 1.6.3 branch in my gemfile. |
@zainonrails then upgrade to 1.6.4. It's released :) Unless I missunderstood you. |
If PublicActivity can't connect to a MySQL Database, it will fail with the following error:
We are using Rails 4.2.11 with Public Activity 1.6.3.
It links to this file https://github.com/chaps-io/public_activity/blob/2c56992a61a1a6deaca92a66f7031e83a05c4e9a/lib/public_activity/orm/active_record/activity.rb#L40
The text was updated successfully, but these errors were encountered: