on fresh Solidus installation, running bundle exec rails g spree:install
, throws exception
$ bundle exec rails g spree:install
/Users/jason/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/yaml.rb:4:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
I'm not sure how I did this but somehow I messed up a default solidus installation to the point where it refuses to run bundle exec rails g spree:install
, crashing with this error now matter what I do.
There are some threads on the internet about this error (see Github Homebrew core issue 11635, Github Homebrew core 11636, this stack overflow, or this stack overflow) most pointing to building libyaml followed by reinstalling Ruby. Some say that even more extreme measures are needed to clear this up, like removing specific references to old ghosts of libyaml which may be on your system.
I tried everything in all of the threads I found to solve this, but the problem persisted and would not go away. None of the advice from any of the links above worked.
Then I simply started from scratch, with a brand new rails app, and the problem went away. So I suspect there is something I inadvertently did in the initial setups that cause this code to produce this error, rather than the library being missing from my system (as all indications suggest)
I am posting here for reference only. cross posted: https://github.com/solidusio/solidus/issues/2434
https://gist.github.com/jasonfb/5d4834a55411a0f45f5f8f966188e117