Not able to start rails server , getting symbol not found in flat namespace

679 views Asked by At

I am setting my Ruby2.4 application on MacM1 with Ruby = 2.7, So I updated gems and other dependencies. Now, I am getting below error in starting server using rails s

require': dlopen(/Users/chakreshwarsharma/.rvm/gems/ruby-2.7.6/gems/therubyracer-0.12.3/lib/v8/init.bundle, 0x0009):
symbol not found in flat namespace '__ZN2v810ScriptData10PreCompileEPKci' - /Users/chakreshwarsharma/.rvm/gems/ruby-2.7.6/gems/therubyracer-0.12.3/lib/v8/init.bundle (LoadError)

I tried to uninstall libv8 and reinstall [email protected] using the below

1. Install home-brew for arch -arm64 &  old libv8 3.15 using the below
2. arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
3. vi ~/.zshrc
4. alias ibrew="arch -x86_64 brew"
5. export PATH="/usr/local/homebrew/bin:$PATH"
6. ibrew install [email protected]
7. gem install therubyracer -v '0.12.3' -- --with-v8-dir=$(ibrew --prefix [email protected])

After this bundle install gets completed but I get the above error while staring rails server.

0

There are 0 answers