更新时间:2023-12-04 18:46:52
这最终成功了,并且有很多麻烦:
This ended up working, with a bunch of finagling:
https://github.com/codica2/rails-puma-ssl
我现在正在使用类似的方法在本地主机上启动Rails: rails s -b'ssl:// localhost:3000?key = server.key& cert = server .crt'
I am now using something like this to launch rails on localhost:
rails s -b 'ssl://localhost:3000?key=server.key&cert=server.crt'
在 / etc / hosts
中,我不得不更改 127.0.0.1 localhost
到 127.0.0.1 localhost.ssl
In /etc/hosts
, I had to change 127.0.0.1 localhost
to 127.0.0.1 localhost.ssl
要查看本地主机,我必须添加 s,例如,Active Admin在此处: https:// localhost:3000 / admin
To see localhost, I have to add the "s" so, for example, Active Admin is here: https://localhost:3000/admin