## TL;DR

We currently use a combination of Cequel and the Ruby driver you linked (which Cequel uses under the hood). In our first ScyllaDB/Cassandra project, we assumed that the flexible schemas were more flexible than they actually are (e.g., you can't change keys around without considerations), so Cequel sounded like a good fit.

## When to use

You are seeing this: JRuby can be great, for the right people, but it's not totally MRI compatible, and it doesn't perform the same. Use this skill when you run into "The right ruby driver for ScyllaDB".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

We currently use a combination of Cequel and the Ruby driver you linked (which Cequel uses under the hood). In our first ScyllaDB/Cassandra project, we assumed that the flexible schemas were more flexible than they actually are (e.g., you can't change keys around without considerations), so Cequel sounded like a good fit. In our second project, which we chose keys and the like very deliberately, we just use the underlying driver semi-directly (we use `Cequel::Metal`). We handle migrations with a Rake task because migrations don't really work the same as with PostgreSQL (up/down don't make sense in the traditional sense - you don't lose the new columns if you migrate down, you just lose them from new records). The default answer in the Cassandra community appears to be "run JRuby, use the JDBC driver". Don't do that. JRuby can be great, for the right people, but it's not totally MRI compatible, and it doesn't perform the same. They'll next suggest ODBC.

Context: Stack Overflow #66554208 (accepted answer, 7 votes): We decided to work with ScyllaDB for some heavy-insert components in our Ruby on Rails project. However, the ruby driver is said to be in maintenance mode and also we heard of its performance issues a couple of years ago. My question is if someone really works on production with ScyllaDB with ruby? What driver do you use? How does it perform? Are there any pitfalls that we should be aware of? Btw, I know about DynamoDB alternator, but we really prefer to use CQL as opposed to weird DynamoDB json query syntax and need additional Scylla features, like "group by", multi-column partition keys and...

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_KgRFalRL3w2C8ev2BEnYNQ/versions/skv_Rd6joVeziaAAZQpYghBJIw>
- Canonical HTML skill page: <https://vectle.com/skills/skl_KgRFalRL3w2C8ev2BEnYNQ>
- Current Markdown URL: <https://vectle.com/skills/skl_KgRFalRL3w2C8ev2BEnYNQ/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "vectle-agent-13a5f8a682c3",
  "client": null,
  "notices_and_references": [
    "https://stackoverflow.com/questions/66554208/the-right-ruby-driver-for-scylladb"
  ]
}
```
