Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4595346
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:57:26+00:00 2026-05-21T22:57:26+00:00

I am just learning rails. I like so much about Rails. It utterly destroys

  • 0

I am just learning rails. I like so much about Rails. It utterly destroys Java and related solutions for productivity in almost all cases – and I am really freaking fast at Java having over a decade experience… so that says something! If rails doesn’t do it, there’s a gem out there that blows my mind away how productive it is.

Then there’s Active Relation. I am trying really hard to use this as my main query approach, but it’s a no-go. I find that once I start building queries that require 2 joins, I start getting weird error messages that don’t make sense… and honestly, all the scopes can be hard to reason about.

While this approach might make things a bit more readable, I think the cost in reasoning what’s going on from a big picture perspective… and the cost of writing the query… probably doesn’t pay for itself. If you are really good at sql… or a language like hql… this way of doing things is actually a productivity loss. At least it is for me.

I could live with it, but I can’t get a nested join to work. For example if I have A<->B<->C, and B is a model that is also a Many-to-Many relationship, ActiveRelation complains that the name of one of the foreign keys is wrong… even though it’s actually correct. I think it’s a bug. All the queries that do single joins using scopes work flawlessly… but if you combine those very same scopes to make 2 joins, it fails. I see no way to fix it.

I could do just one of the joins, and then let the ORM do the rest for me… but that’s going to be such a waste of performance. That’s going to end in disaster for a big site. I am writing a massive system that stores massive trees of relational data by the thousands per request. Traversing the graph using the ORM is just too much of a performance killer that I won’t even bother continue to code the rest of the app. I’ll probably have to go back to Java if this is the case.

On top of this, I can’t find any examples of multiple joins on the net. Even the documentation hardly mentions joins and merges at all.

So… is it ready for prime time? How does one do really complex 7-9 table joins in Rails? Is Rails just not built for this? I only ask this because if Rails can’t handle this type of querying, I will unfortunately have to stop using it… and trust me… that’s a massive, real shame… because I absolutely LOVE everything else. I really hope I am just wrong and everything is fine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T22:57:27+00:00Added an answer on May 21, 2026 at 10:57 pm

    To tell you the truth, i can relate a bit, but the truth is that we most times do not know how to handle things and get frustrated. Rails, with its steep learning curve, is a great example of that 🙂 I was trying to do a left outer join one time and it looked so messy, only to find out that i could do it in a cleaner way.

    Rails can actually do all sorts of joins, once you learn how to instruct it (and that can indeed be a challenge, based on my experience).

    What i found out is that using a bit of Ruby at times, makes the procedure easier. A little map might just save the whole thing.

    However, when you can’t do something, it’s not because Rails does not handle it, but because you do not have the knowledge to do it properly yet. Rails is hard and some things seem very unclear, just because you don’t know about them at first.

    About the A,B,C thing, it should work fine. It’s highly probably(if not certain), that you are doing something wrong on naming your keys(you can be 100% sure that it’s not a Rails bug 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm just learning Ruby on Rails. I've read a few books, I've watched lots
I am just learning about app.config in respect of creating custom sections. I have
I'm just learning about SVG, and it seems great but I'm not sure about
I'm just learning Objective-C/Cocoa programming for the Mac. All of the tutorials, books, blogs,
As I am learning more about rails, and breaking my design thinking from ASP.Net
I'm just learning how to program in Ruby on Rails, and I'm really impressed
I'm just learning rails and I've run into a bit of a snag. Let
I'm just learning Ruby on Rails (no prior Ruby experience) I have these models
I am just getting started learning rails. I am building my first app using
I'm just learning to work with partial classes in VB.NET and VS2008. Specifically, I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.