Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup mac (very) bitrotted. #258

Open
dbp opened this issue Oct 3, 2022 · 1 comment
Open

Setup mac (very) bitrotted. #258

dbp opened this issue Oct 3, 2022 · 1 comment

Comments

@dbp
Copy link

dbp commented Oct 3, 2022

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 :( 
@blerner
Copy link
Collaborator

blerner commented Oct 4, 2022

I don't have a Mac (or even a working dev computer at the moment), but swing by and I'll see if I can't help you get set up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants