草庐IT

chef_gem

全部标签

ruby - 错误sudo : gem: command not found

我试图在CentOS上安装ruby​​rep,当执行sudogeminstallruby​​rep时,我收到错误sudo:gem:commandnotfound。Sudo和gem都已安装并可以正常工作,只是结合使用时不行。我的设置:[rubyrep]#whichsudo/usr/bin/sudo[rubyrep]#whichgem/usr/local/rvm/rubies/ruby-2.1.2/bin/gem[rubyrep]#whichruby/usr/local/rvm/rubies/ruby-2.1.2/bin/ruby[rubyrep]#$PATH-bash:/usr/loca

linux - 使用 Chef 配方将多行附加到配置文件

我正在尝试创建一个ChefRecipe以将多行(20-30)附加到特定的配置文件。我知道推荐的模式是changeentireconfigfiles而不仅仅是附加到文件,但出于多种原因我不喜欢这种方法。到目前为止,我找到的唯一解决方案是使用cookbook_file,然后使用bash资源来执行以下操作:catlines_to_append>>/path/configfile显然这不会正常工作,因为它会一遍又一遍地附加文件,每次运行chef-client。我必须先创建一个小的bash脚本来检查特定的字符串,如果找不到,则附加到文件中。但这似乎违背了使用Chef的初衷。一定有更好的方法。一个

linux - 使用 Chef 配方将多行附加到配置文件

我正在尝试创建一个ChefRecipe以将多行(20-30)附加到特定的配置文件。我知道推荐的模式是changeentireconfigfiles而不仅仅是附加到文件,但出于多种原因我不喜欢这种方法。到目前为止,我找到的唯一解决方案是使用cookbook_file,然后使用bash资源来执行以下操作:catlines_to_append>>/path/configfile显然这不会正常工作,因为它会一遍又一遍地附加文件,每次运行chef-client。我必须先创建一个小的bash脚本来检查特定的字符串,如果找不到,则附加到文件中。但这似乎违背了使用Chef的初衷。一定有更好的方法。一个

linux - Chef 中的 apt-get update 和 apt-get upgrade

如果Chef中的package"nginx"被翻译成Ubuntu节点上的apt-getinstallnginx,那么可以在Chef配方中编写的内容将被翻译成:apt-get-yupdateapt-get-yupgrade无法从aptcookbook中找出答案. 最佳答案 TheOpscode"apt"cookbook的默认配方将运行apt-getupdate以确保更新包缓存。我们建议将其放在节点运行列表的早期,以便稍后可以安装正确版本的包。出于几个原因,我们通常不建议用户在配方中使用“apt-getupgrade”。apt-get可

linux - Chef 中的 apt-get update 和 apt-get upgrade

如果Chef中的package"nginx"被翻译成Ubuntu节点上的apt-getinstallnginx,那么可以在Chef配方中编写的内容将被翻译成:apt-get-yupdateapt-get-yupgrade无法从aptcookbook中找出答案. 最佳答案 TheOpscode"apt"cookbook的默认配方将运行apt-getupdate以确保更新包缓存。我们建议将其放在节点运行列表的早期,以便稍后可以安装正确版本的包。出于几个原因,我们通常不建议用户在配方中使用“apt-getupgrade”。apt-get可

mysql - gem安装mysql失败

我已按照http://geryit.com/blog/2011/01/installing-mysql-with-rails-on-mac-os-x-snow-leopard/上的说明进行操作,包括通过macport安装ruby​​。每当我执行geminstallmysql时,我都会收到以下错误bash-3.2#geminstallmysqlBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingmysql:ERROR:Failedtobuildgemnativeextension./opt/local/b

mysql - gem安装mysql失败

我已按照http://geryit.com/blog/2011/01/installing-mysql-with-rails-on-mac-os-x-snow-leopard/上的说明进行操作,包括通过macport安装ruby​​。每当我执行geminstallmysql时,我都会收到以下错误bash-3.2#geminstallmysqlBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingmysql:ERROR:Failedtobuildgemnativeextension./opt/local/b

mysql - 在 macOS Sierra 上安装 mysql2 gem

我正在尝试在macOSSierra(10.12.1)上安装mysql2gem(0.4.5)并收到错误。我没有本地mysql服务器,它是远程的。这是错误日志:checkingforruby/thread.h...yescheckingforrb_thread_call_without_gvl()inruby/thread.h...yescheckingforrb_thread_blocking_region()...nocheckingforrb_wait_for_single_fd()...yescheckingforrb_hash_dup()...yescheckingforrb_i

mysql - 在 macOS Sierra 上安装 mysql2 gem

我正在尝试在macOSSierra(10.12.1)上安装mysql2gem(0.4.5)并收到错误。我没有本地mysql服务器,它是远程的。这是错误日志:checkingforruby/thread.h...yescheckingforrb_thread_call_without_gvl()inruby/thread.h...yescheckingforrb_thread_blocking_region()...nocheckingforrb_wait_for_single_fd()...yescheckingforrb_hash_dup()...yescheckingforrb_i

mysql - Rails 3 - MySQL 客户端库版本不正确!为错误的客户端库版本编译的 Gem

我克隆了github存储库https://github.com/8bitpal/hackful,运行“bundleinstall”,现在运行“rakedb:create”。但是我收到一条错误消息:IncorrectMySQLclientlibraryversion!Thisgemwascompiledfor5.0.45buttheclientlibraryis5.5.15.试图找出有关我的mysql设置的更多信息:$mysql_config--version$5.0.45$mysql$mysql>SELECTversion();+-----------+|version()|+----