Anyone vibe-converted a Rails app to Phoenix?
- How did it go?
- Which tools did you use?
- Any tips?
Asking for a friend ![]()
Anyone vibe-converted a Rails app to Phoenix?
Asking for a friend ![]()
I have not but if I were to, outside-in bdd sounds like a good fit.
Have your llm port the integration tests over. Run those and see them fail. Then port the controller/unit tests and follow the standard red/green bdd methodology until everything is green.
Not necessarily vibe-converted, but definitely LLM assisted. It wasnât a Rails application, but it was in Ruby.
My memory is somewhat fuzzy on the specifics, but I relied on the stranger fig pattern a lot. I ended up putting a load balancer in front of both applications, and gradually moved endpoints over, as they were implemented.
The application wasnât enormous, but had some risky parts - billing, for one. At time of migration, the Ruby application was about 16kLOC Ruby, almost zero JS (less than 200 lines).
In some sort of irony, itâs actually the first project I tried building in Phoenix way back in 2014. But I ended up grinding on an Ecto library for weeks for a feature I needed, which was an absolutely gruelling process. At that point I decided to just use what I knew, which was Ruby. But all the years past I still maintained that library, and itâs now being used in the rewrite (again).
grinding on Ecto is also my first experience with Phoenix, but Iâve decided to abandon it almost immediately and go with stored functions/procedures in Postgres + ecto_gen that generated the code around them in Elixir.
Weâve later replaced it with db-gen, which is language/framework agnostic tool, and we are using that for years. Ecto is a big no-no in our projects. Even C# ones use db-gen instead of Entity Framework.
Yes, I created Xamal this way.
My first try was would match the âvibe-convertedâ description: It took an existing Rails app and asked Claude 4.x to convert to Elixir using high effort. The result was messy and not something I would want to maintain or use in production, so I discarded it.
Then, I told Claude to analyze the Rails project and create a detailed spec for a team that would have to implement this in a different language but would not have access to the original code or product. With that, I asked Claude to analyze this spec and determine what order to develop all the elements in, such that a user could start playing with the app at every stage. I specifically asked it to stay away from implementation details (so it wouldnât suggest Rails-style âsolutionsâ for things like caching or background queues).
This gave me a bunch of .md files that I used to create a brand new Phoenix/Ash project that I then worked through step by step to implement the way you would fresh in Elixir. It was a lot more work than anything vibe-coded/converted but I am quite happy with the result.
Thanks for the replies everyone - very helpful!
I think for this particular project I will try an LLM to upgrade it to Rails 8 (currently on Rails 4) because it has an e-commerce component and doesnât really need the power of Elixir/the BEAM, but definitely going to try converting one in the future!
If anyone stumbles across this thread in future and has any further tips, please add them!