Tag: macos

OpenSSL :: X509 ::显示错误域名证书的证书

我正在遍历域列表以查看a)是否有443个侦听器和b)收集ssl证书过期,签名算法和公用名。 所有拥有443监听器的域都会报告正确的ssl证书(与Chrome报告的内容相匹配),但是,有一个域无法正确报告 – myproair.com,它报告了parkinsonsed.com的证书 – 任何想法? # ssl cert lookup begin timeout(1) do tcp_client = TCPSocket.new(“#{instance[“domain”]}”, 443) ssl_client = OpenSSL::SSL::SSLSocket.new(tcp_client) ssl_client.connect cert = OpenSSL::X509::Certificate.new(ssl_client.peer_cert) ssl_client.sysclose tcp_client.close #http://ruby-doc.org/stdlib-2.0/libdoc/openssl/rdoc/OpenSSL/X509/Certificate.html date = Date.parse((cert.not_after).to_s) row.push(“#{date.strftime(‘%F’)} #{cert.signature_algorithm} #{cert.subject.to_a.select{|name, _, _| name == ‘CN’ }.first[1]}”.downcase.ljust(57)) end rescue SocketError row.push(“down”.ljust(57)) rescue Errno::ECONNREFUSED row.push(“connection refused”.ljust(57)) rescue Errno::ECONNRESET row.push(“connection reset”.ljust(57)) rescue Timeout::Error row.push(“no 443 […]

Ruby不是从mac os x开始的

当我尝试在终端上使用ruby时,没有任何反应。 我使用它的最后几天,一切正常,但现在已经不复存在了。 我安装了rvm和1.9.3版本的ruby。 当我使用ruby myscript.rb启动脚本时,它可以工作,我尝试安装rails但是当我键入gem install rails出现错误: /Users/romainberger/.rvm/rubies/ruby-1.9.3-p194/bin/gem:4: warning: Insecure world writable dir /Users/romainberger/.rvm/gems/ruby-1.9.3-p194 in PATH, mode 040777 由于没有输出,我不知道问题的来源。 有人有想法吗? 谢谢 编辑: rvm info ruby-1.9.3-p194: system: uname: “Darwin romain.home 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64” bash: “/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin11)” zsh: “/bin/zsh => zsh 4.3.11 […]

MySQL2 / Ruby 1.9.3 / Rails上的分段错误3.2

我一直很难让rails 3.2与mysql2一起工作。 我正在运行OSX 10.6,MySQL 5.1.37 我正在获得这个可爱的堆栈跟踪。 HunterMBP:v hunter$ bundle exec rake db:create /Users/hunter/.rvm/gems/ruby-1.9.3-p125/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle: [BUG] Segmentation fault ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin10.8.0] — Control frame information ———————————————– c:0033 p:-543968548 s:0099 b:0099 l:000098 d:000098 TOP c:0032 p:—- s:0097 b:0097 l:000096 d:000096 CFUNC :require c:0031 p:0107 s:0093 b:0093 l:000092 d:000092 TOP /Users/hunter/.rvm/gems/ruby-1.9.3-p125/gems/mysql2-0.3.2/lib/mysql2.rb:8 c:0030 p:—- s:0091 b:0091 l:000090 […]

耙子流产了! 无法在El Capitan上加载这样的文件 – mysql2 / mysql2

我在过去两周内一直在尝试在Mac上设置我的代码。 以前我使用的是Ubuntu,设置代码从未如此困难。 我几乎遵循了所有教程,但没有运气。 请任何人都可以指导我在mac上设置RoR。 在完成所有教程后,我最终只得到了mysql错误。 rake aborted! cannot load such file — mysql2/mysql2 /Users/sahil/Documents/work/ccprod/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:251:in `require’ /Users/sahil/Documents/work/ccprod/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:251:in `block in require’ /Users/sahil/Documents/work/ccprod/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:236:in `load_dependency’ /Users/sahil/Documents/work/ccprod/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:251:in `require’ /Users/sahil/Documents/work/ccprod/vendor/bundle/ruby/1.9.1/gems/mysql2-0.3.14/lib/mysql2.rb:8:in `’ /Users/sahil/.rvm/gems/ruby-1.9.3-p551@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `require’ /Users/sahil/.rvm/gems/ruby-1.9.3-p551@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require’ /Users/sahil/.rvm/gems/ruby-1.9.3-p551@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `each’ /Users/sahil/.rvm/gems/ruby-1.9.3-p551@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require’ /Users/sahil/.rvm/gems/ruby-1.9.3-p551@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each’ /Users/sahil/.rvm/gems/ruby-1.9.3-p551@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require’ /Users/sahil/.rvm/gems/ruby-1.9.3-p551@global/gems/bundler-1.10.6/lib/bundler.rb:134:in `require’ /Users/sahil/Documents/work/ccprod/config/application.rb:9:in `’ /Users/sahil/Documents/work/ccprod/Rakefile:4:in `’ (See full trace by running task […]

获取libxml2.2.dylib的错误“文件不是必需的体系结构”

我正在尝试使用rvm在运行Snow Leopard的Mac上安装Ruby 1.9.2。 我的.bash_profile包含 ARCHFLAGS=”-arch x86_64″ 要安装ruby,我运行: rvm install 1.9.2 -C –enable-shared 编译时出错。 这是make.error.log: [2010-01-20 10:03:00] make ld: in /usr/local/lib/libxml2.2.dylib, file is not of required architecture collect2: ld returned 1 exit status make[1]: *** [../../.ext/i386-darwin10.2.0/tcltklib.bundle] Error 1 make: *** [mkmain.sh] Error 1 编辑: 我从源代码安装了readline并尝试了这样的安装: rvm install 1.9.2 -C –enable-shared,–with-readline-dir=/usr/local 这导致了与以前相同的错误。 rcltklib.bundle文件的位置是: /usr/local/lib/ruby/1.8/i686-darwin9.7.0/tcltklib.bundle (我认为这个文件是Ruby OSX安装的一部分)

Ruby / Rails / SQLite的一键安装?

我已经习惯了MAMP的One-Click安装本地环境。 是否存在Ruby等效…您运行的下载并立即获得本地运行的最新版本的Ruby,Rails,SQLite? 我正在使用Mac,运行Leopard,并且我知道所有上述技术都附带Leopard(除了SQLite之外)。 我参考较新版本的书籍以及我需要的最后一件事是尝试改进教程以使用我的版本。 还有一个不太重要的问题:什么是“gem”,我需要确保的东西也是完全更新的?

在Yosemite 10.10.3上安装Nokogiri

我有: Mac OS X Yosemite 10.10.3 MacPorts(不是Brew) 系统中的Ruby 2(不是RVM) 我想安装Nokogiri并尝试: port install nokogiri 得到了: Building native extensions. This could take a while… ERROR: Error installing nokogiri: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20150323-30174-1mqhl4i.rb extconf.rb checking if the C compiler accepts … yes checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future… no Building nokogiri […]

如何从命令行打开ruby中的STDOUT.sync

我有Objective-C代码调用ruby脚本并监视STDOUT。 但是,默认情况下ruby似乎没有同步STDOUT,因此我需要在脚本开头放置STDOUT.sync = true以查看输出是否正常。 我可以在调用ruby脚本时将其作为命令行选项吗?

Errno :: EACCES:运行bundle时权限被拒绝,它命中json 1.8.1,pg 0.17

我刚买了一台新笔记本电脑,并使用Migration Assistant完全转移了所有内容。 看起来一切正常并处于适当的位置,所以我不知道这是不是问题。 我仍然是调试这样的环境错误的新手。 我一直在Windows上开发一个rails项目,这台笔记本电脑是Mac OS X 10.8。 我之前已经克隆了一个GitHub项目,它运行良好。 这是github回购以供参考。 当我运行bundle时,这个项目会出错 错误 Using rake (10.1.0) Using i18n (0.6.1) Using multi_json (1.8.2) Using activesupport (3.2.13) Using builder (3.0.4) Using activemodel (3.2.13) Using erubis (2.7.0) Using journey (1.0.4) Using rack (1.4.5) Using rack-cache (1.2) Using rack-test (0.6.2) Using hike (1.2.3) Using tilt (1.4.1) Using sprockets (2.2.2) Using […]

由于符号链接错误,无法在Mac OSX 10.8.1中安装ruby-1.9.2

首先,我尝试了常见的rvm安装。 rvm install 1.9.2 但是,显示以下错误: The provided compiler ‘/usr/bin/gcc’ is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`. 然后我跑 rvm requirements 并发现以下部分输出有用 Right now Ruby requires gcc to compile, but Xcode 4.2 and later no longer ship with gcc. Instead they ship with llvm-gcc (to which gcc […]