梳理M1芯片Mac mini 执行 pod install 失败Ruby直接崩

Python015

梳理M1芯片Mac mini 执行 pod install 失败Ruby直接崩,第1张

环境:2020款M1芯片Mac mini ,Xcode 13.3.1,Ruby为自带2.6.8

简述:

    刚开始安装时还按照正常逻辑安装cocoapods,执行pod install 时,报Ruby崩溃,让上报错误信息:

You may have encountered a buginthe Ruby interpreter or extension libraries.Bug reports are welcome.For details:https://www.ruby-lang.org/bugreport.html

最后几番折腾,知道是 ffi 相关包执行X86指令集,需要适配M1芯片架构,即arm64指令集

主要涉及Ruby版本,我系统版本Mac OS 12.3.1,ruby版本系统自带2.6.8,升级ruby会涉及其他软件包,gem等,皆升级到最新。

此时Ruby升级为3.0.0,再次安装pod,问题解决

详细步骤不再重复造轮子,引用下面这位作者文章,对我帮助很大,感谢:https://www.jianshu.com/p/a768181c1245

集成gitlab CI后,脚本执行pod install后出现两个问题:1.让注册当前Mac mini设备ID到profile文件。这是无需的,我们需要在 xcodebuild archive 时 添加 -destination 'generic/platform=iOS' 即可解决;2. 再次pod install时发现 Pods.xcodeproj 不能正常生成,报 can not open Pods.xcodeproj 错误,解决:在 ~/.profile 文件增加: export LANG=en_US.UTF-8

ruby的汉语意思如下:

n.

红宝石深红色。

adj.

红宝石的红宝石色的。

ruby的读音是:英 [ˈruːbi]   美 [ˈruːbi] 。

ruby的造句如下:

1、RDT is a far more full-featured Ruby IDE with a ton of exciting and time-saving options.

RDT是一个功能更为完善的Ruby开发环境,具备许多令人兴奋并且可以节省大量开发时间的选项。

2、Rich ruby color with tastes of black cherry, full plum and soft vanilla and toffee notes.

酒体呈漂亮的宝石红色,富含蓝莓和熟李子的果香,以及优雅的香草及太妃糖香气。

3、Download and install Ruby libraries easily.

容易地下载和安装ruby库。

4、Tasting notes: A bright ruby red colour with attractive purple hues.

品酿笔记:酒泽如红宝石般明亮动人,但又透露著 * 紫色于其中。

5、Deep ruby coloured with purple reflections in the first years and tending to orange when older.

深宝石红,年轻时泛紫色边缘,随着时间变化会慢慢转成橘黄色。

6、The origin of Ruby Fall.

红宝石瀑布的起源.

只能去服务器更改了。更改步骤如下:

1. 修改 安装目录/redmin/apps/redmine/htdocs/config/database.yml,更对对应的用户名,密码,数据库地址,端口号

production:

adapter: mysql2

database: bitnami_redmine

host: 127.0.0.1

username: root

password: ""

port: 3307

encoding: utf8

socket: /home/hyadmin/redmin/mysql/tmp/mysql.sock

development:

adapter: mysql2

database: redmine_development

host: localhost

username: root

password: ""

encoding: utf8

# Warning: The database defined as "test" will be erased and

# re-generated from your development database when you run "rake".

# Do not set this db to the same as development or production.

test:

adapter: mysql2

database: redmine_test

host: localhost

username: root

password: ""

encoding: utf8

2. 进入如下目录

cd 安装目录/redmin/apps/redmine/htdocs/script

3. 执行如下命令,进入ruby

./rails console production

4. 取得你要修改的用户对象(ruby>代表进入ruby环境)

ruby>admin_user = User.find_by_login('你要改的用户名')

5.修改admin用户对象密码

ruby>admin_user.password = '你的密码'

注: 这个密码不能太短,否则报错。

6.保存admin用户对象信息

ruby>admin_user.save!

7.退出ruby环境

ruby>quit

这样应该就可以用yourpassword这个新密码登录系统了