ruby-pg
rbenv
Our great sponsors
ruby-pg | rbenv | |
---|---|---|
9 | 68 | |
751 | 15,774 | |
- | 0.8% | |
7.5 | 5.6 | |
7 days ago | about 2 months ago | |
C | Shell | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ruby-pg
-
Test Driving a Rails API - Part One
If you installed Postgres via Homebrew, you need to configure bundler so that when it installs the pg gem, it knows where to find the pg_config executable, which is installed as part of Postgres. The pg gem is the Ruby interface to Postgres and requires pg_config during installation. We can use this command to configure bundler so that it can find it and successfully install pg.
-
It's not Ruby that's slow, it's your database
Before we proceed, are you aware that a lot of popular database drivers for Ruby (and Python? not sure) implement the performance-critical bits in good old natively compiled C?
For example, the Ruby postgres gem: https://github.com/ged/ruby-pg/tree/master/ext
(I wasn't sure until I checked just now, so I'm not questioning your familiarity with the tech. Just not sure if that's commonly known)
So no, it's not the database, it's your interpreted language.
-
Insert CSV Rows into a Database Using Vanilla Ruby
$ gem info pg *** LOCAL GEMS *** pg (1.3.4) Authors: Michael Granger, Lars Kanis Homepage: https://github.com/ged/ruby-pg License: BSD-2-Clause Installed at: /Users/jvon1904/.rvm/gems/ruby-3.0.3 Pg is the Ruby interface to the PostgreSQL RDBMS
- Explaining Ruby Fibers
-
Is it possible to lazy load a long text from the database?
The low level pg gem has support for Postgres streaming, but this is row-based. You're wanting to stream effectively from a single field, which Postgres won't do for you.
-
49 Days of Ruby: Day 31 - Working with Databases
The ruby-pg gem provides an interface between your Ruby code and your PostgreSQL database.
-
How to fix "Bundler::GemRequireError" and "Gem Load Error is: AddDllDirectory failed" when switching from Sqlite3 to Postgres in Rails 6
set RUBY_DLL_PATH=/bin as in our CI before running the ruby app.
-
Ruby 3.0 and the new FiberScheduler interface
> each is in its own OS thread and GVL releases when the thread blocks.
The GVL isn't automatically released when a thread blocks on IO. Each bit of native code performing IO has to explicitly release it like in the pg gem here: https://github.com/ged/ruby-pg/blob/fb465855ce1dd12cf7eb69c9...
rbenv
-
Ask HN: Is anybody getting value from AI Agents? How so?
When I was technical blogging on how to learn from open-source code [1], I used it quite frequently to get unstuck and/or to figure out how to tease apart a large question into multiple smaller functions. For example, I had no idea how to break up this long `sed` command [2] into its constituent parts, so I plugged it into ChatGPT and asked it to break down the code for me. I then Googled the different parts to confirm that ChatGPT wasn't leading me astray.
If I had asked StackOverflow the same question, it would have been quickly closed as being not broadly applicable enough (since this `sed` command is quite specific to its use case). After ChatGPT broke the code apart for me, I was able to ask StackOverflow a series of more discrete, more broadly-applicable questions and get a human answer.
TL;DR- I quite like ChatGPT as a search engine when "you don't know what you don't know", and getting unblocked means being pointed in the right direction.
1. https://www.richie.codes/shell
2. https://github.com/rbenv/rbenv/blob/e8b7a27ee67a5751b899215b...
-
Test Driving a Rails API - Part One
Let’s get started. I prefer to manage my Ruby installations on my development machine with chruby paired with ruby-install. Another outstanding set of tools is rbenv with ruby-build. I highly recommend installing Ruby with one of those two sets of tools. Follow the instructions on their project’s READMEs. For this article, I’ll be running Ruby (MRI) v3.3.0.
-
How To Set Up Your Coding Environment
By setting up your environment in isolation, you can prevent yourself from a lot of issues when experimenting with code. It makes your code behave more predictable due to the defined state of the runtime environment you are working with. This article should provide you with enough information to get started, but obviously, there is a lot more power embedded in NVM, Virtual Environment and RBEnv. So make sure to check their documentation.
-
State of Ruby : What version manager to use
There is this good resource that also talk about different ruby version manager from the Rbenv repository. With some links to benchmarks of ASDF and Rbenv.
-
Ruby version
rbenv (my personal favorite)
-
Problems starting msfdb init
One suggestion would be to setup your install based on a development environment using git and a Ruby version manager like rvm or rbenv to allows you to setup a user controlled gemset and execution path.
-
What's the number one reason that you use a Mac over a PC?
rbenv for Ruby
-
Ruby on Rails en Windows con WSL2
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
-
Issues with Unicode in pry running in Debian-11
On MacOS, I haven't had a problem with character encodings in the terminal in ruby for a while, but used to. When I used to, it had to do with how ruby had been installed, in particular that it needed to be compiled linking against an appropriate readline library. Are you trying to use the ruby that came with debian? You might have more luck installing ruby yourself, and using a ruby version manager. rbenv might be the simplest for you.
-
Is there any reason to use Ruby 2.7 over Ruby 3.x?
For my local machine, I use RVM (head). Other options are rbenv and asdf.
What are some alternatives?
hypopg - Hypothetical Indexes for PostgreSQL
asdf - Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more
cubrid - CUBRID is a comprehensive open source relational database management system highly optimized for Web Applications.
RVM - Ruby enVironment Manager (RVM)
async-pool - Provides support for connection pooling both singleplex and multiplex resources.
chruby - Changes the current Ruby
pymgclient - Python Memgraph Client
nvm - Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions
libsmb2 - SMB2/3 userspace client
ruby-install - Installs Ruby, JRuby, Rubinius, TruffleRuby or MRuby
pgslice - Postgres partitioning as easy as pie
ruby-build - A tool to download, compile, and install Ruby on Unix-like systems.