Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djalmaaraujo/dce79d94bd6d2584a8b7330dcca29980 to your computer and use it in GitHub Desktop.
Save djalmaaraujo/dce79d94bd6d2584a8b7330dcca29980 to your computer and use it in GitHub Desktop.
Setup project rails 4.2.x and ruby 2.5.x on Mac M1

I've some problem when setup project with:

  • Rails 4.2.10
  • Ruby 2.5.3
  • Postgresql 13

My steps:

Install Homebrew

arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Next,

  arch -x86_64 brew install node
  arch -x86_64 bew install postgresql
  arch -x86_64 bew install redis
  arch -x86_64 brew install cmake
  
  npm -g install yarn

Install rvm

  \curl -sSL https://get.rvm.io | bash -s stable
  source $HOME/.rvm/scripts/rvm
  arch -x86_64 rvm install 2.5.3

Then

  gem install bundler
  
  arch -x86_64 bundle install
```

Fix error when `bundle install`

```
  arch -x86_64 gem install pg -v '0.18.1' --  --with-pg-config=/Applications/Postgres.app/Contents/Versions/13/bin/pg_config  --with-cflags=-Wno-error=implicit-function-declaration
  arch -x86_64 gem install ffi -v '1.9.6' -- --with-cflags=-Wno-error=implicit-function-declaration
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment