我的红宝石版本是
ruby 1.9.3p374 (2013-01-15) [i386-mingw32]
Run Code Online (Sandbox Code Playgroud)
我在安装了mingw的Windows 8下运行.
如何将其升级到ruby 2.0?
我已经在努力尝试升级 Rails 3.0 大约一周了。
我不完全确定问题是什么,但我认为这可能是因为我同时拥有 rvm 和 rbenv。
我在这里遵循了 gorails 的升级教程:https ://gorails.com/setup/osx/12-monterey
但每当我跑步时:
$ rbenv install 3.0.3
我收到以下错误:
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)
Run Code Online (Sandbox Code Playgroud)
这也是我的错误日志的一个例子:
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. …Run Code Online (Sandbox Code Playgroud) 基于之前的StackOverflow问题,看起来将Ruby升级到最新补丁级别的正确方法是:
$ rvm upgrade 1.9.2 1.9.2-p0
Are you sure you wish to upgrade from ruby-1.9.2-p0 to ruby-1.9.2-p136? (Y/n): Y
Run Code Online (Sandbox Code Playgroud)
但是,这对我来说似乎不起作用:
$ rvm upgrade 1.9.3 1.9.3-p0
Are you sure you wish to upgrade from ruby-1.9.3-p194 to ruby-1.9.3-p0? (Y/n): n
Cancelling upgrade.
$ rvm upgrade 1.9.3-p0 1.9.3
Are you sure you wish to upgrade from ruby-1.9.3-p194 to ruby-1.9.3-p194? (Y/n): n
Cancelling upgrade.
$ rvm upgrade 1.9.3-p0 1.9.3-p194
Are you sure you wish to upgrade from ruby-1.9.3-p194 to ruby-1.9.3-p194? (Y/n): n
Cancelling upgrade. …Run Code Online (Sandbox Code Playgroud)