Skip to content

Setup mac (very) bitrotted. #258

@dbp

Description

@dbp

I went through, attempting to update it, but got stuck trying to get libv8 (the ruby gem install). This is an an M1 mac, and the updated readme (up to where I got stuck), in case that's helpful, is:

Homebrew

# Install Homebrew
$/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# Install postgres, npm, rbenv
brew install postgresql node rbenv ruby-build

Postgres

# Connect to postgres database
psql postgres

# Create bottlenose role
postgres=# create role bottlenose login createdb;

# Quit psql
postgres=# \q

If you run into authentication trouble later, you may need to modify
the pg_hba.conf in /etc/postgres/.../ to allow local ident auth.

Ruby

Best practice for Ruby in development is to use a version manager like rvm or rbenv. Once you have the correct version [installed] (https://github.com/rbenv/rbenv#homebrew-on-macos)

# run this and follow the printed instructions to get ruby env set up:
rbenv init

# Install the ruby version
rbenv local

# Move out of and into directory (maybe not needed)
cd .. && cd bottlenose

# Install Ruby's package manager "Bundler".
gem install bundler

# Install ruby distribution of V8
bundle install libv8 # (DOES NOT WORK!)

# Install Bottlenose's dependencies.
# (from the bottlenose directory checked out from git)
bundle install

The actual error ends with:

Subprocess failed with return code 2.
/Users/dbp/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:83:in `block in setup_build_deps!': unable to fetch v8 source (RuntimeError)```

Which from a tiny bit of tracking down, seems to be a semi-recurring problem if there isn't a platform install of this. Maybe there is a way to build it outside of ruby and get the gem to use it? I dunno. I didn't have a ton of time to spend getting this set up, and I've used it up :( 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions