Tag: macos

Heroku toolbelt更新失败

我正试图让Heroku工具带工作,这是一场彻头彻尾的噩梦。 安装成功运行,但是当我运行heroku更新时,我得到: $ heroku update failed ! undefined method `output_with_arrow’ for # 我已经尝试了一切,包括卸载我的heroku gem并通过以下方式删除工具带: rm -rf /usr/loca/heroku sudo rm /usr/bin/heroku 这非常令人沮丧。 我的环境是Mac OS 10.7 Lion和: $ ruby -v ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0] $ which ruby /Users/J/.rvm/rubies/ruby-1.9.3-p125/bin/ruby $ heroku version heroku-gem/2.19.2 $ which heroku /usr/bin/heroku

无法在OSX上运行带有RVM的Ruby 2.2.3

我有两部MacBook(一部在小牛队,另一部在优胜美地),同样的事情发生在两者上。 使用RVM安装Ruby 2.2.3后,出现以下错误: .rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/net/http.rb:923:in `connect’: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (Faraday::SSLError) 我曾尝试在线搜索解决方案,但似乎没有任何效果。 大多数有此问题的人都在运行Windows机器。 $ rvm osx-ssl-certs status all Certificates for /usr/local/etc/openssl/cert.pem: Up to date. Certificates for /etc/openssl/cert.pem: Up to date. 切换回2.2.2工作正常。 有什么想法吗?

SSL_connect返回= 1 errno = 0状态= SSLv3读取服务器证书B:证书validationMAC失败

我正在尝试使用SoundCloud SDK进行用户身份validation。 用户点击“登录”后的第一条路线: get “/login” do client = Soundcloud.new(:client_id => ‘MY_ID’, :client_secret => ‘MY_SECRET’, :redirect_uri => ‘http://localhost:9393/signed_in’) redirect client.authorize_url() end 然后我有下一个重定向的路线: get “/signed_in” do client = Soundcloud.new(:client_id => ’16d6ada1a0cfc5009f7d59d203a13b2f’, :client_secret => ‘845df7d44dc4e359fedc8ed5944d29a5’, :redirect_uri => ‘http://localhost:9393/signed_in’) code = params[:code] access_token = client.exchange_token(:code => code) end 我可以成功点击重定向url并传回代码,但我收到Sinatra的以下错误: 在/ signed_in的OpenSSL :: SSL :: SSLError SSL_connect返回= 1 errno = […]

Ruby strftime’%Z’方法返回’0545’而不是’NPT’

在将我的MacOS升级到最新版本后,我对Time#strftime方法有一些奇怪的问题。 Time.now.in_time_zone(“Kathmandu”).strftime(“%Z”) #=> ‘+0545’ Time.now.in_time_zone(“Bangkok”).strftime(“%Z”) #=> ‘+07’ Time.now.in_time_zone(“Nairobi”).strftime(“%Z”) #=> ‘EAT’ Time.now.in_time_zone(“New Delhi”).strftime(“%Z”) #=> ‘IST’ 我目前的ruby版本是: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16] 我试过了: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin16] 仍然没有工作 我在朋友的机器上试过这个(ruby 2.4.1p111(2017-03-22修订版58053)[x86_64-darwin15])并且工作正常。 Time.now.in_time_zone(“Kathmandu”).strftime(“%Z”) #=> ‘NPT’ Time.now.in_time_zone(“Bangkok”).strftime(“%Z”) #=> ‘ICT’ Time.now.in_time_zone(“Nairobi”).strftime(“%Z”) #=> ‘EAT’ Time.now.in_time_zone(“New Delhi”).strftime(“%Z”) #=> ‘IST’

主要的未定义方法`require_relative’:Object(NoMethodError)

在尝试更新OpenSSL时 – 我在笔记本电脑上打破了(似乎)Ruby和Rails的所有内容。 即使通过gem uninstall和rvm remove卸载ruby和rails之后我仍然rvm remove这个错误: Drews-MacBook-Pro:bookstore drewwyatt$ rails server bin/rails:3: undefined method `require_relative’ for main:Object (NoMethodError) 几个月来一切都运转正常,直到我四处乱窜 – 更糟糕的是,我甚至不确定我做了什么来搞砸了。 额外信息 Drews-MacBook-Pro:bookstore drewwyatt$ ruby -v ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0] Drews-MacBook-Pro:bookstore drewwyatt$ which ruby /Users/drewwyatt/.rvm/rubies/ruby-2.0.0-p247/bin/ruby Drews-MacBook-Pro:bookstore drewwyatt$ rails -v bin/rails:3: undefined method `require_relative’ for main:Object (NoMethodError) Drews-MacBook-Pro:bookstore drewwyatt$ which rails /Users/drewwyatt/.rvm/rubies/ruby-2.0.0-p247/bin/rails Drews-MacBook-Pro:bookstore drewwyatt$ […]

安装libv8 3.11.8.3时出错

我正在运行全新安装的OSX 10.9 Mavericks和XCode 5.0.1。 当我试图在我的项目中运行bundle install时,它无法安装libv8 gem。 这是输出: ERROR: Error installing libv8: ERROR: Failed to build gem native extension. /Users/user1/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb creating Makefile Configured with: –prefix=/Applications/Xcode.app/Contents/Developer/usr –with-gxx-include-dir=/usr/include/c++/4.2.1 Unable to find a compiler officially supported by v8. It is recommended to use GCC v4.4 or higher Using compiler: g++ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Users/user1/.rvm/gems/ruby-1.9.3-p448/gems/libv8-3.11.8.3/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o has no symbols In […]

如何在mac osx上安装libksba?

根据rvm的要求,“对于Ruby 1.9.3:安装libksba#如果使用Homebrew,’brew install libksba’” 我是全新的,不熟悉终端命令。 如何在不使用自制程序的情况下安装libksba? 请帮忙!!!

使用RVM Mac OS X安装Ruby 1.9.2时出现问题

我为自己的无知道歉 – 我对此很新 – 但我已经尝试了一切,并且无法使用RVM安装1.9.2。 我相信我已经正确安装了RVM,当我去安装1.9.2时,当ruby尝试编译时,我的make日志中出现以下错误: ld: in /usr/local/lib/libz.1.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64) for architecture x86_64 collect2: ld returned 1 exit status make[1]: *** [../../../.ext/x86_64-darwin10.6.0/digest/md5.bundle] Error 1 make: *** [mkmain.sh] Error 1 其他一些信息:我在32位运行OS X,并收到类似的错误 – 用我相信(i36)替换(x86_64)。 我现在以64位运行。 *更新*: 我已经完成了TinMan要求我做的所有事情,但仍无济于事 – 只想指出我可以安装1.8.7就好了。 尝试安装1.9.1和1.9.2给出了以下错误消息: `Installing Ruby […]

无法设置ruby环境 – 安装fii gem错误

我正在尝试为ruby项目设置环境。 但是当我运行’bundle’时,我在安装’fii’gem时遇到错误: Installing ffi (1.8.1) Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /Users/bmalets/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb checking for ffi.h… *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. /Users/bmalets/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:381:in `try_do’: The compiler failed to […]

无法在Mac OS上安装任何ruby gems – SSL_connect错误

我的环境是Mac OS 10.10.5,ruby版本2.2.4(或2.2.2或2.2.0)gem(升级后)是2.6.7,rvm版本1.27.0。 即使在最近几天,这也有几个重复,但这比我在评论中提供的信息更多。 在任何版本的ruby上安装任何gem时,我得到以下内容: $ gem install bundler ERROR: Could not find a valid gem ‘bundler’ (>= 0), here is why: Unable to download data from https://rubygems.org/ – SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz) 有很多关于此的信息,特别是对于Windows上的问题。 有关建议的解决方案,请参见http://guides.rubygems.org/ssl-certificate-update/ 。 我遵循这个但我继续得到同样的错误。 问题似乎是将文件GlobalSignRootCA.pem放在适当的地方,这一点并不完全清楚。 上面的链接解释了如何找到合适的ssl_certs目录,其中有2个在我的系统中,但都没有工作。 我忘了在哪里学到了以下内容: $ ruby -ropenssl -e ‘puts OpenSSL::X509::DEFAULT_CERT_DIR’ /etc/openssl/certs […]