Jack
Jack

Reputation: 763

Problems when setting up Heroku for a Ruby app - 2 conflicting Ruby versions

I am following this instructions: https://devcenter.heroku.com/articles/getting-started-with-ruby#local-workstation-setup

All fine until I try to run:

foreman start

And I get this back:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/yaml.rb:4:in `': It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby.

In order to fix it I run:

brew install libyaml
rvm reinstall 2.0.0

Then again:

foreman start

and nothing has been solved. Same error. Googling around I have seen that the problem could be having 2 conflicting ruby versions. I run:

which -a ruby

/Users/jacoposcotti/.rvm/rubies/ruby-2.0.0-p481/bin/ruby /usr/bin/ruby

Should I remove one? How?


output of:

rvm list

=>

rvm rubies

=> ruby-2.0.0-p481 [ x86_64 ]
ruby-2.1.1 [ x86_64 ]
* ruby-2.1.2 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

Upvotes: 1

Views: 71

Answers (2)

Jack
Jack

Reputation: 763

I had a faulty Yosemite DP1 installed on my Mac, I killed it with fire and reinstalled everything. It solved the problem.

Upvotes: 0

Paritosh Piplewar
Paritosh Piplewar

Reputation: 8132

try this

 rvm use ruby-2.0.0-p481

and use whenever you want to use ruby-2.0.0

Upvotes: 1

Related Questions