Remove Rails Constant #129
In a Jets application, the Rails constant is currently defined. Requesting to remove the Rails constant.
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.
Remove the Rails constant.
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!
Will have to dig into this to figure out the issues and let it simmer on the brain for a bit.
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
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!