无法在OSX 10.11.3上安装Puma gem

时间:2016-02-11 01:53:35

标签: ruby-on-rails ruby macos rubygems puma

我只是重新格式化我的MacBook,然后尝试克隆我的Rails项目。当我做DateTime dt = Convert.ToDateTime(comboBoxWeekToSchedule.SelectedValue); 时,Puma gem失败了。

当我运行bundle install时,我收到此错误:

gem install puma -v '2.13.4'

我该怎么办?

关于我的项目和我的环境:

  • Ruby:2.2.0(我使用RVM)
  • Rails:4.2.0
  • OSX:10.11.3

2 个答案:

答案 0 :(得分:22)

而不是按照Zulhilmi Zainudin的建议强制链接openssl(根据此Github Opened issue推荐的 NOT ), 我推荐以下基于Puma源代码问题783的解决方案(参考下文) 我正在使用El Capitan(10.11)和openssl通过Homebrew安装:

$ gem install puma -v 2.13.4 -- --with-opt-dir=/usr/local/opt/openssl

参考:https://github.com/puma/puma/issues/783

但是如果你想让它适用于你所有的Gemfiles,你仍然可以:

$ bundle config build.puma --with-opt-dir=/usr/local/opt/openssl

并确认:
$ grep PUMA ~/.bundle/config

输出应为:

BUNDLE_BUILD__PUMA: "--with-opt-dir=/usr/local/opt/openssl"

参考:https://github.com/puma/puma/issues/718

答案 1 :(得分:4)

This solution适合我:

brew install openssl
brew link --force openssl
相关问题