Why Ruby on Rails Developers Don't Need to Switch to Python for AI
For the last few years, every AI conversation seemed to end with the same conclusion:
"If you want to build AI applications, learn Python."
And yes, Python is currently dominating the AI landscape. Most AI frameworks, tutorials, courses, and research projects are built around Python. Tools like PyTorch, Hugging Face, LangChain, and countless AI libraries make it the default choice for machine learning and AI development.
But what if you're already comfortable with Ruby and Rails (like me)?
Do you really need to switch?
I don't think so.
The AI Misconception
Many developers associate AI with:
- Training neural networks
- Building custom models
- Deep learning research
- Data science
But the reality is that most companies are not training the next GPT model.
They're building:
- AI chatbots
- Internal knowledge bases
- AI-powered search
- Customer support assistants
- Workflow automation
These are software engineering problems.
Rails is already good at solving them
A modern AI stack can look surprisingly simple:
Rails API
+
RubyLLM
+
PostgreSQL + pgvector
+
Sidekiq
+
OpenAI / Claude / Gemini
With this setup you can build a complete RAG (Retrieval-Augmented Generation) application (I've built chatbot at Roomspilot with that stack).
For example:
- Upload PDFs or documentation
- Split content into chunks
- Generate embeddings
- Store them in PostgreSQL using pgvector
- Retrieve relevant content through vector search
- Send the context to an LLM
That's basically how many production AI assistants work today.
FastAPI vs Rails API Mode
A common AI stack in Python looks like this:
FastAPI
+
PostgreSQL
+
Vector Database
+
OpenAI
The Ruby equivalent is:
Rails API Mode
+
PostgreSQL + pgvector
+
RubyLLM
+
OpenAI
Different language.
Same architecture.
As Rails developers, we already know how to build APIs, background jobs, authentication systems, multi-tenant applications, and scalable products.
The AI part is often just another integration.
Where Python still wins
If your goal is:
- Model training
- Deep learning
- Computer vision
- AI research
Python is the clear winner.
No debate there.
Where Rails still shines
If your goal is shipping AI-powered products quickly, Rails remains an excellent choice.
You don't have to throw away years of experience just because AI became the hottest topic in tech.
Sometimes the smartest move isn't learning an entirely new stack.
It's adding new capabilities to the stack you already master.
Top comments (0)