Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Can't load gem without ActiveRecord #35

Open
jpowell opened this issue Apr 20, 2017 · 6 comments
Open

Can't load gem without ActiveRecord #35

jpowell opened this issue Apr 20, 2017 · 6 comments

Comments

@jpowell
Copy link

jpowell commented Apr 20, 2017

This gem assumes your project is using ActiveRecord and fails in the boot process. Does it make sense to assume the ORM? Should ContentfulRails be extending ActiveRecord::Migration with something from ContentfulModel? This coupling is troublesome when you have a thin client and are using contentful as your database...

@dlitvakb
Copy link
Contributor

I will look into removing this hard dependency.

Cheers

@reidcooper
Copy link
Contributor

Running into the same issue.

@jpowell
Copy link
Author

jpowell commented Jul 10, 2018

@reidcooper

We've built a gem that auto generates all your classes, and has some helpful rails specific (but not dependent) tooling around webhooks, reindexing, etc.

https://github.com/watermarkchurch/wcc-contentful

Theoretically, you could alias your namespace (ex, Contentful = WCC::Contentful) and use similar to how you'd use the other contentful gem. It's not a one-to-one replacement for theirs, as we've encompassed a few different patterns from the rails and ruby gems, as well as the ContentfulModel gem.

Let me know if you have any feedback (if you take a look)

@reidcooper
Copy link
Contributor

@jpowell Hey i was taking a look at your gem. How do I integrate it? Similar to this rails gem here?

@dlitvakb
Copy link
Contributor

dlitvakb commented Jul 13, 2018

Hey @reidcooper & @jpowell,

I'm currently on parental leave, I'm back on August 1st. I will remove the dependency as soon as I'm back.

Cheers

Edit: That said, ActiveSupport will remain as a dependency.

@jpowell
Copy link
Author

jpowell commented Jul 13, 2018

congrats @dlitvakb!

@reidcooper moved convo here

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

No branches or pull requests

3 participants