RSSAmplifier

Blog

Bibliographic Wilderness

bibwild.wordpress.comRSS feed ↗20 posts

Latest posts

Getting started with Claude Code, on MacOS, with chruby and rspec

I ve been writing ruby and rails for nearly 20 years. A couple weeks ago, I had gotten code snippets from copy-paste in a chat window, but I hadn t even experimented with Claude Code or similar can write code to your file system tools. I know some people are now using LLM s to write all their Continue reading Getting started with Claude Code, on MacOS, with chruby and rspec

ActiveRecord neighbor vector search, with per-document max

I am doing LLM RAG with rails ActiveRecord, postgres with the pgvector extension for vector similarity searches, and the neighbor gem. I am fairly new to all of this stuff, figuring it out by doing it. I realized that for a particular use, I wanted to get some document diversity so i wanted to Continue reading ActiveRecord neighbor vector search, with per-document max

Help fund attorney for artist charged with transporting zines(?!?)

i know Des Revol, and know them to be an incredibly kind, solid, reliable person. For real he s facing federal charges and threat of deportation because of subversive political pamphlets found in his trunk. Des was not at the Prairieland demonstration. Instead, on July 6, after receiving a phone call from his wife in jail Continue reading Help fund attorney for artist charged with transporting…

Whisper-generated transcripts used in presentation of archival video

Here at the Science History Institute, we have a fairly small, but growing, body of video/film in our Digital Collections, at present just over 100 items, around 70 hours total. We wanted to add transcripts/captions to these videos, for accessibility to those who are hearing impaired, for searchability of video transcript content, and for general Continue reading Whisper-generated transcripts used…

Using CloudFlare Turnstile to protect certain pages on a Rails app

I work at a non-profit academic institution, on a site that manages, searches, and displays digitized historical materials: The Science History Institute Digital Collections. Much of our stuff is public domain, and regardless we put this stuff on the web to be seen and used and shared. (Within the limits of copyright law and fair Continue reading Using CloudFlare Turnstile to protect certain pages…

Accessing capybara-screenshot artifacts on Github CI

We test our Rails app with rspec and capybara. For local testing, we use the capybara-screenshot plugin which Automatically save screen shots when a Capybara scenario fails , even when the tests were running in a headless browser you couldn t see at all. This can be very helpful in debugging tricky capybara failures, especially ones that Continue reading Accessing capybara-screenshot artifacts on…

Getting rspec/capybara browser console output for failed tests

I am writing some code that does some smoke tests with capybara in a browser of some Javascript code. Frustratingly, it was failing when run in CI on Github Actions, in ways that I could not reproduce locally. (Of course it ended up being a configuration problem on CI, which you d expect in this case). Continue reading Getting rspec/capybara browser console output for failed tests

keyword-like arguments to JS functions using destructuring

I am, unusually for me, spending some time writing some non-trivial Javascript, using ES modules. In my usual environment of ruby, I have gotten used to really preferring keyword arguments to functions for clarity. More than one positional argument makes me feel bad. I vaguely remembered there is new-fangled way to exploit modern JS features Continue reading keyword-like arguments to JS functions…

Sort order of results in OCLC AssignFAST/fastsuggest API

We have long used the free OCLC AssignFAST API to power an auto-suggest/auto-complete in some of our staff metadata entry forms. (Note: While OCLC calls this service AssignFAST in docs, the base URL instead includes the term fastsuggest as in http://fast.oclc.org/searchfast/fastsuggest?, which may be confusing for some!) Recently our staff reported they thought the sort Continue reading Sort order…

Cloudfront in front of S3 using response-content-disposition

At the Science History Institute Digital Collections, we have a public collection of digitized historical materials (mostly photographic images of pages). We store these digitized assets originals as well as various resizes and thumbnails used on our web pages in AWS S3. Currently, we provide access to these assets directly from S3. For Continue reading Cloudfront in front of S3 using…

Run your Rails gem CI on rails main branch

attr_json is basically an ActiveRecord extension. It works with multiple versions of Rails, so definitely runs CI on each version it supports. But a while ago on attr_json, i set up CI to run on Rails main unreleased branch. I already was using appraisal to test under multiple Rails versions. (which I recommend; sure it Continue reading Run your Rails gem CI on rails main branch

Consider a small donation to rubyland.news?

I started rubyland.news a few years ago because it was a thing I wanted to see for the Ruby community. I had been feeling a shrinking of the ruby open source collaborative community, it felt like the room was emptying out. If you find value in Rubyland News, just a few dollars contribution on my Continue reading Consider a small donation to rubyland.news?

Beware sinatra, rails 7.1, rack 3, resque bundler dependency resolution

tldr practical advice for google: If you use resque 3.6.0 or less, and Rails 7.1, and are getting an error: cannot load such file -- rack/showexceptions you probably need to add rack "~ 2.0" to your Gemfile! The latest version of the ruby gem sinatra, as I write this, is 3.1.0, and it does Continue reading Beware sinatra, rails 7.1, rack 3, resque bundler dependency resolution

S3 CORS headers proxied by CloudFront require HEAD not just GET?

I m not totally sure what happened, but the tldr is that at the end of last week, our video.js-played HLS videos served from an S3 bucket — via CloudFront — appears to have started requiring us to list HEAD in the AllowedMethods for CORS configuraton, in addition to pre-existing GET . I m curious if anyone else Continue reading S3 CORS headers proxied by CloudFront require HEAD not just GET?

Investigating OCR and Text PDFs from Digital Collections

At the Science History Institute Digital Collections, we have a fairly small collection compared to some peers (~70,000 images) of historical materials. Many of those images are of text: Books, pamphlets, advertisements, memos, etc. We haven t previously done any OCR (Optical Character Recognition), but started thinking about doing that. In addition to using captured text Continue reading…

OCFL and “source of truth” — two options

Some great things about conferences is how different sessions can play off each other, and how lots of people interested in the same thing are in the same place (virtual or real) at the same time, to bounce ideas off each other. I found both of those things coming into play to help elucidate what Continue reading OCFL and source of truth two options

Escaping/encoding URI components in ruby 3.2

Thanks to zverok_kha s awesome writeup of Ruby changes, I noticed a new method released in ruby 3.2: CGI.escapeURIComponent This is the right thing to use if you have an arbitrary string that might include characters not legal in a URI/URL, and you want to include it as a path component or part of the query Continue reading Escaping/encoding URI components in ruby 3.2

attr_json 2.0 release: ActiveRecord attributes backed by JSON column

attr_json is a gem to provide attributes in ActiveRecord that are serialized to a JSON column, usually postgres jsonb, multiple attributes in a json hash. In a way that can be treated as much as possible like any other ordinary (database column) ActiveRecord. It supports arrays and nested models as hashes, and the embedded nested Continue reading attr_json 2.0 release: ActiveRecord attributes…

A tiny donation to rubyland.news would mean a lot

I started rubyland.news in 2016 because it was a thing I wanted to see for the ruby community. I had been feeling a shrinking of the ruby open source collaborative community, it felt like the room was emptying out. If you find value in Rubyland News, just a few dollars contribution on my Github Sponsors Continue reading A tiny donation to rubyland.news would mean a lot

vite-ruby for JS/CSS asset management in Rails

I recently switched to vite and vite-ruby for managing my JS and CSS assets in Rails. I was switching from a combination of Webpacker and sprockets I moved all of my Webpacker and most of my sprockets to vite. I am finding it generally pretty agreeble, so I thought I d write up some of Continue reading vite-ruby for JS/CSS asset management in Rails