4 ms·
To me, the best part about sequel is that it works with jruby. I use it as a secret weapon when I need a db automation that runs practically anywhere thanks to
by nurettin 2y ago
To me, the best part about sequel is that it works with jruby. I use it as a secret weapon when I need a db automation that runs practically anywhere thanks to JVM (and thanks to Jeremy).
- pantulis 2y agoIt's been years since I investigated it but isn't ActiveRecord running in JRuby these days?
- nurettin 2y agoYes, rails targets jruby, so it should be possible to accomplish something similar with activerecord as well. I just like Sequel the way I like Sinatra.
- pantulis 2y agoGreetings from another Sinatra lover!
- Alifatisk 2y agoAre you saying it is compitable with JRuby (using a adapter) nowadays or are you saying ActiveRecord runs in a JRuby process when running Rails?
- pantulis 2y agoIt was a honest question, I was curious if, using JRuby, I could use ActiveRecord as an ORM instead of Sequel. I am not challenging any preference towards Sequel.
- Lio 2y agoYes you can use either. I think you might be slightly more limited in your choice of database drivers compared to MRI Ruby but I believe there’s a JDBC driver that should fill the gap.
- Alifatisk 2y agoI wasn't sure about how I should interpret your question or if it was statement, that's why I asked. Yes, you can use the jdbc adapter made by the JRuby team! https://github.com/jruby/activerecord-jdbc-adapter https://github.com/jruby/activerecord-jdbc-adapter Though, in my opinion, the best combo has been Sinatra + Sequel.
- Alifatisk 2y ago> db automation that runs practically anywhere thanks to JVM Doesn't both JRuby and CRuby require you to download platform specific executable? Or does JRuby offer a portable standalone executable? If that is the case then I might also switch.
- rpeden 2y agoYou can download the complete JRuby JAR, which will run happily anywhere you have a JVM.
- nurettin 2y agoYou don't want to distribute JRuby's executable, or your ruby code. To release, what you want to do is to compile your program and all its dependencies (including JRuby's jar file) into a single jar using something like warbler. This also acts as a layer of obfuscation, since JRuby produces code that generates classes dynamically, so it will all look very ugly to the human eye.
- Alifatisk 2y agoOh I see, thank you!