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
Remove Rails Constant #129
Comments
Hi @tongueroo, maybe it's not necessary to remove I tried to define the following before loading dynamoid:
It prevents errors in dynamoid but also cause errors in deployment:
|
@jalerson Maybe. Think it'll be great if it ends up working by delegating Rails to Jets for the specific case of Dynamoid 😁 Wondering what the error at the child stack is. Currently, the logging only shows the parent stack events. I usually look at the CloudFormation console to see what the error is on the child stack. Maybe it's an error that I might know off the bat. Think for the general case, it's probably best to get rid of the Rails constant. It'll handle the rest of the gems. 🧐 |
@jalerson Another idea to workaround until I have more time to look at this is fork the dynamoid gem and comment out the Rails logic. Then you can include the forked dynamoid gem to your specific project like so Gemfile: gem "dynamoid", git: "https://github.com/jalerson/dynamoid.git", branch: "master" Understand it might not be ideal, so it's just an idea to help unblock you. Will dig into this more though! |
Released in v1.5.0 CHANGELOG |
Summary
In a Jets application, the Rails constant is currently defined. Requesting to remove the Rails constant.
Motivation
The reason it would be good to remove this constant is that other gems, libraries, and plugins check for the Rails constant to infer that it's in a Rails app and perform some Rails specific logic. Having the Rails constant defined in a Jets application results in not being able to use these libraries in Jets applications. Being able to use these libraries would be a huge benefit.
Links:
Guide-level explanation
Remove the Rails constant.
Reference-level explanation
TBD
Drawbacks
Jets uses Rails to do some heavy lifting like rendering. This is one of the reasons why Rails is currently defined. Some of the ActionView code defines it. So it's a decent amount of work, but think it's still worth it though!
Unresolved Questions
Will have to dig into this to figure out the issues and let it simmer on the brain for a bit.
The text was updated successfully, but these errors were encountered: