【Xcode】Comando Install adaptado al entorno del proyecto
Nota
#Primero bundle bundle install --path vendor/bundle #Y luego usa el bundle del proyecto bundle exec pod install
Nota
#Primero bundle bundle install --path vendor/bundle #Y luego usa el bundle del proyecto bundle exec pod install
古い環境が必要となり旧macへXcodeやRuby環境つくる時にハマったので覚書
20220315
■環境
macOS High Sierra 10.13.6
Homebrew 3.4.1-67-gb31d8e9
rbenv 1.2.0
こんなエラーが発生
Downloading openssl-1.1.1l.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
Installing openssl-1.1.1l...
BUILD FAILED (Mac Os X 10.13.6 using ruby-build 20220218)
Inspect or clean up the working tree at /var/folders/rc/9hwgt2nd0rxgjzvt9kc0zgph0000gn/T/ruby-build.20220315231102.889.ggie1q
Results logged to /var/folders/rc/9hwgt2nd0rxgjzvt9kc0zgph0000gn/T/ruby-build.20220315231102.889.log
Last 10 log lines:
/usr/include/CommonCrypto/CommonRandom.h:35:9: error: unknown type name 'CCCryptorStatus'
typedef CCCryptorStatus CCRNGStatus;
^
crypto/rand/rand_unix.c:385:47: error: use of undeclared identifier 'kCCSuccess'
if (CCRandomGenerateBytes(buf, buflen) == kCCSuccess)
^
2 errors generated.
make[1]: *** [crypto/rand/rand_unix.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2
そこでOpenSSL1.0が必要
以下のコマンドにて「rbenv/tap/openssl@1.0 1.0.2t」がインストールされる
#OpenSSL1.0をInstall
brew install rbenv/tap/openssl@1.0
#環境変数設定 [hogeはuserだよ]
echo 'export PATH="/usr/local/opt/openssl@1.0/bin:$PATH"' >> /Users/hoge/.bash_profile
#環境変数反映
source .bash_profile
#必要なら環境変数反映
export LDFLAGS="-L/usr/local/opt/openssl@1.0/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@1.0/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.0/lib/pkgconfig"
#これその後のコマンド用に必要!
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl@1.0`"
#好きなRubyインストール
rbenv install 2.6.9
macOSの場合はOpenSSLの影響が他にもある
OpenSSLはRailsなどに使用するmysql2ライブラリーにも影響あり、MySQL5.6 Or 5.7使用する際にも影響あるので注意!
bundle installする前に
[.bundle/config]ファイルへ
以下、設定が必要!
BUNDLE_BUILD__MYSQL2: "--with-ldflags=-L/usr/local/opt/openssl@1.0/lib --with-cppflags=-I/usr/local/opt/openssl@1.0/include"
—
【Mac】rbenv openssl [BUILD FAILED] [make: *** [all] Error 2]
Necesité un entorno antiguo y me topé con problemas al configurar Xcode y el entorno Ruby en una Mac vieja, así que lo anoto.
20220315
■Entorno
macOS High Sierra 10.13.6
Homebrew 3.4.1-67-gb31d8e9
rbenv 1.2.0
Aparece este error
Downloading openssl-1.1.1l.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
Installing openssl-1.1.1l...
BUILD FAILED (Mac Os X 10.13.6 using ruby-build 20220218)
Inspect or clean up the working tree at /var/folders/rc/9hwgt2nd0rxgjzvt9kc0zgph0000gn/T/ruby-build.20220315231102.889.ggie1q
Results logged to /var/folders/rc/9hwgt2nd0rxgjzvt9kc0zgph0000gn/T/ruby-build.20220315231102.889.log
Last 10 log lines:
/usr/include/CommonCrypto/CommonRandom.h:35:9: error: unknown type name 'CCCryptorStatus'
typedef CCCryptorStatus CCRNGStatus;
^
crypto/rand/rand_unix.c:385:47: error: use of undeclared identifier 'kCCSuccess'
if (CCRandomGenerateBytes(buf, buflen) == kCCSuccess)
^
2 errors generated.
make[1]: *** [crypto/rand/rand_unix.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2
Se necesita OpenSSL 1.0
El siguiente comando instala «rbenv/tap/openssl@1.0 1.0.2t»
#Instalar OpenSSL1.0
brew install rbenv/tap/openssl@1.0
#Configurar variables de entorno [hoge es el usuario]
echo 'export PATH="/usr/local/opt/openssl@1.0/bin:$PATH"' >> /Users/hoge/.bash_profile
#Reflejar variables de entorno
source .bash_profile
#Si es necesario, reflejar variables de entorno
export LDFLAGS="-L/usr/local/opt/openssl@1.0/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@1.0/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.0/lib/pkgconfig"
#¡Necesario para los comandos posteriores!
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl@1.0`"
#Instalar Ruby que prefieras
rbenv install 2.6.9
En macOS, OpenSSL afecta a otros componentes
OpenSSL también afecta a la librería mysql2 usada por Rails y similares, así que ten cuidado también cuando uses MySQL 5.6 u 5.7.
Antes de ejecutar bundle install
Es necesario agregar la siguiente configuración al archivo [.bundle/config]
BUNDLE_BUILD__MYSQL2: "--with-ldflags=-L/usr/local/opt/openssl@1.0/lib --with-cppflags=-I/usr/local/opt/openssl@1.0/include"
Github
$ ssh -T git@github.com $ git@github.com: Permission denied (publickey).
Hmm?
The [.ssh] directory looks fine
Checked logs with
ssh -vT git@github.com
or
ssh -vvv git@github.com
Errors point to the key
Github SSHKey on the web page
It’s gone!
Apparently SSH public keys expire and get deleted automatically
Recreated and set it up. Problem solved.
El método de acceso a Github ha cambiado
「git push -u origin develop」
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
La autenticación por contraseña ha sido discontinuada y cambió al método de token de acceso.
Es necesario iniciar sesión en Github web y crear un token de acceso.
1.Abre la pantalla de configuración( https://github.com/settings/tokens )
2.Haz clic en [Generate new token]
3.Ingresa un nombre de token apropiado en note
4.Configura los permisos「si vas a tocar repo, necesitas al menos el permiso repo」
5.Haz clic en [Generate token]
6.Guarda el token generado ★Atención! Asegúrate de copiar y pegar el token que se muestra aquí
★Se requiere el permiso [repo] para acceder al repositorio
★Se requiere el permiso [workflows] para actualizar GitHub Action
★Por restricciones de seguridad, el token de acceso solo puede crearse con una validez máxima de 360 días
git push -u origin develop Username for 'https://github.com': hogehoge Password for 'https://hogehoge@github.com':★
hogehoge=nombre de usuario
★=token
puedes acceder con esto
Apache 2.4.39
[.htaccess] O [httpd.conf]
# Configurar IP permitida para acceso en 0.0.0.0 # Control de acceso a panel de administración para AWS ELB <location "/wp-admin"> # IP de administración SetEnvIf X-Forwarded-For "0.0.0.0.*" allowed_ip_admin SetEnvIf X-Forwarded-For "0.0.0.0.*" allowed_ip_admin Order Deny,Allow Deny from all Allow from env=allowed_ip_admin </location>