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
buggy install can be examined here: https://github.com/jasonfb/solidus_240_helloworld_BUGGY_solidio-solidis-Issue2434
I know what I did here.
I mistakenly tried to install rails new using rails 5.2.0.beta, thinking maybe the head of solidus would just work on it. (dumb assumption).
After starting by generating a Rails 5.2.0.beta app, I then switched my gemfile's rails version down to 5.1.4. Don't do this; it doesn't work.
I then proceeded to add the Solidus gems themselves, and that when I hit the non-fixable exception after bundle exec rails g spree:install
On my two subsequent attempts to do a fresh Solidus install, I correctly used
rails _5.1.4_ new solidus-hello-world
to check which version of Rails you have install in your active gemset, use rails -vI think what happened is that I had the 5.2.0.beta active and just ran
rails new solidus-hello-world
and it installed a 5.2.0.beta app.