I've been struggling with trying to upgrade rails 3.0 for about a week now.
I'm not entirely sure what the issue is but I was thinking it could be due to the fact that I have both rvm and rbenv.
I've followed the upgrade tutorial from gorails here: https://gorails.com/setup/osx/12-monterey
But whenever I run:
$ rbenv install 3.0.3
I get the following error:
In file included from compile.c:40:
./vm_callinfo.h:217:16: error: use of undeclared identifier 'RUBY_FUNCTION_NAME_STRING'
if (debug) rp(ci);
^
./internal.h:95:72: note: expanded from macro 'rp'
#define rp(obj) rb_obj_info_dump_loc((VALUE)(obj), __FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING)
Here is also a look at my error logs:
In file included from compile.c:40:
./vm_callinfo.h:217:16: error: use of undeclared identifier 'RUBY_FUNCTION_NAME_STRING'
if (debug) rp(ci);
^
./internal.h:95:72: note: expanded from macro 'rp'
#define rp(obj) rb_obj_info_dump_loc((VALUE)(obj), __FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING)
^
2 errors generated.
make: *** [compile.o] Error 1
I'm a junior dev who coded a majority of the time RoR but I truly do not understand this environment stuff, so if anyone has any resources that I could read up on that would help, it would be much appreciated. If I left out any crucial information, my apologies. Just let me know and I'll try to respond as quickly as possible
CodePudding user response:
Try this I hope that work for you
brew update
brew upgrade
brew install llvm
export PATH="/usr/local/opt/llvm/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include"
rbenv install 3.0.3
rbenv rehash
CodePudding user response:
Finally found a solution. Essentially there was an OS update and with that some command tool updates that weren't showing up. After forcing the update for the command tools it updated to rub 3.0.3 without any issues.