Stack Overflow

Reverting to Readline 6.3.8 to unbreak the Rails console

When running a brew upgrade, it upgraded readline to version 7.0. This broke the Rails console. Here’s how that looked:

$ bundle exec rails c
Running via Spring preloader in process 69075
/Users/mroach/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport- `require':
  dlopen(/Users/mroach/.rbenv/versions/2.3.1/lib/ruby/2.3.0/x86_64-darwin15/readline.bundle, 9):
  Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib (LoadError)

Here’s how I reverted to readline 6.3.8 to fix this:

# Uninstall this incompatible version
brew uninstall readline

# Go to the local clone of homebrew-core
cd $(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core

# Move to the homebrew-core revision that had 6.3.8
git checkout 35fed817726f61a9d40c8420582f6fde59eb5f14

# Re-install readline
brew reinstall readline

# Switch back to HEAD
git checkout master

# Pin readline so this can't happen again
brew pin readline

Posted 29 Sep 2016

openssl non-interactive

Using openssl with the --subject argument allows you to generate certificates without being prompted for any input. This non-interactive mode makes server automation that much easier.

openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout testapp.key -out testapp.crt \
-subj /C=CA/ST=Quebec/L=Montreal/O=Poutine LLC/OU=devops/CN=*.poutine.net

Subject vars

C ISO country code
ST State/Province/Subdivision
L Locality/City/Town
O Organisation/Company
OU Organisational Unit/Department
CN Common name. The most important! Your domain name! Wildcards supported.

Posted 27 Sep 2016

Wishlist for desktop SQL query client

Say what you will about Microsoft SQL Server Management studio, but the query interface was actually pretty good. Now that I’m using PostgreSQL and MySQL I’m finding myself looking for desktop tools for querying. Nothing more than that, just simple CRUD operations for one-off data imports, querying, figuing stuff out.

It’s been staggeringly difficult to find a desktop client that can do this well. If I were to create one, which I may if my struggle continues, this would be my wishlist. Some of these seem obvious but I’ve found clients lacking one or more of these.

Posted 14 Dec 2014

My Flight Map v2.0 Beta

The 2.0 beta version of My Flight Map is currently open for beta testing at kaya.mroach.com. This is a full rewrite using Rails 4.1. With the new platform it will be easier to maintain and add features. The UI is the last bit needing some attention.

Version 2.0 is open source and hosted on GitHub at https://github.com/mroach/myflightmap. All are welcome to submit issues for feature requests and bug reports.

More to come when we’re live.

Posted 15 Nov 2014

RollbarSharp updated to 0.3.0

The new release adds two bits of missing functionality.

Session data

Data from the Session object is now added to reports. Data is described/stringified as best we can, with non-value types being reported with their type name, hash code, and .ToString() value.

Param scrubbing

Sensitive paramter values are now scrubbed. Each character is replaced with an asterisk. By default, any parameter in the following list will be scrubbed:

password password_confirmation confirm_password secret secret_token creditcard credit_card credit_card_number card_number ccnum cc_number

You can override this list by setting the Rollbar.ScrubParams configuration option.

View RollbarSharp on GitHub

Posted 06 Dec 2013

Mossy is Born!

Faced with having to script out schema and objects from a SQL Server database, the only option was using SMO. That’s a Windows-only solution that has some known bugs and performance problems. Using the management views in SQL Server you can script everything out yourself. So I created mossy to do that in Ruby. It can script out a whole database in under 15 queries and depending on the size of modules, should only takes a few seconds.

View mossy on GitHub

Posted 28 Nov 2013

Gardener for Visual Studio

I like the vim theme gardener so I ported it to Visual Studio.


Posted 01 Nov 2011