Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add psych gem to gemspec #720

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add psych gem to gemspec #720

wants to merge 1 commit into from

Conversation

amorphid
Copy link

@amorphid amorphid commented Oct 8, 2018

Problem

We're using formeman in a project, and one of our users had trouble getting (the script that calls) foreman to start properly. It seems the problem was the psych gem was not installed.

$ bin/foreman-start.sh 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:29 --:--:--     0curl: (6) Could not resolve host: mirrors.gigenet.com
/usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/yaml.rb:5:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).

Solution

Including the psych gem in gemspec. This is a defensive coding option. Normally I wouldn't recommend including a dependency that isn't directly consumed by the application. However, in this case, psych should be included in Ruby installs anyway, so including it in foreman seems like an appropriate solution.

$ asdf install ruby 2.5.0
$ asdf shell ruby 2.5.0
$ gem list | grep psych
psych (default: 3.0.2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant