Ruby error : undefined method `load_yaml' for Gem:Module (NoMethodError) when using Heroku's foreman start-Record and share programming errors
I’m starting to play with Heroku to deploy a simple Node.js in their free plan. But when I run foreman start
, I see this error :
/Library/Ruby/Site/1.8/rubygems/builder.rb:10: undefined method `load_yaml' for Gem:Module (NoMethodError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1110:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1110
from /usr/local/foreman/lib/foreman/process.rb:2:in `require'
from /usr/local/foreman/lib/foreman/process.rb:2
from /usr/local/foreman/lib/foreman/engine.rb:3:in `require'
from /usr/local/foreman/lib/foreman/engine.rb:3
from /usr/local/foreman/lib/foreman/cli.rb:3:in `require'
from /usr/local/foreman/lib/foreman/cli.rb:3
from /usr/bin/foreman:13:in `require'
from /usr/bin/foreman:13
Problem : I know close to nothing to the Ruby platform, I don’t use. I just happened to have rvm installed on my machine because I once wanted to play Octopress (Blog generator based on Jekyll). I first searched the internet, but couldn’t find anything. I also visited the official RVM site and followed the troubleshooting basic steps : I ran rvm stable
(which just produced no output…), ensured the call to the RVM script came last in my ~/.bash_profile
, and yes I’m using bash.
Here’s the info I can give so you can help me.
I’m under OS X 10.6.8.
rvm list
prints :
rvm rubies
=> ruby-1.9.2-p290 [ x86_64 ]
which ruby
prints :
/Users/khalid_jebbari/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
rvm info
prints :
ruby-1.9.2-p290:
system:
uname: "Darwin djebbz 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"
zsh: "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"
rvm:
version: "rvm 1.8.3 by Wayne E. Seguin ([email protected]) [https://rvm.beginrescueend.com/]"
ruby:
interpreter: "ruby"
version: "1.9.2p290"
date: "2011-07-09"
platform: "x86_64-darwin10.8.0"
patchlevel: "2011-07-09 revision 32553"
full_version: "ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0]"
homes:
gem: "/Users/khalid_jebbari/.rvm/gems/ruby-1.9.2-p290"
ruby: "/Users/khalid_jebbari/.rvm/rubies/ruby-1.9.2-p290"
binaries:
ruby: "/Users/khalid_jebbari/.rvm/rubies/ruby-1.9.2-p290/bin/ruby"
irb: "/Users/khalid_jebbari/.rvm/rubies/ruby-1.9.2-p290/bin/irb"
gem: "/Users/khalid_jebbari/.rvm/rubies/ruby-1.9.2-p290/bin/gem"
rake: "/Users/khalid_jebbari/.rvm/gems/ruby-1.9.2-p290/bin/rake"
environment:
PATH: "/Users/khalid_jebbari/.gem/ruby/1.8/bin:/usr/local/heroku/bin:/Users/khalid_jebbari/bin/bin:/Users/khalid_jebbari/.rvm/gems/ruby-1.9.2-p290/bin:/Users/khalid_jebbari/.rvm/gems/ruby-1.9.2-p290@global/bin:/Users/khalid_jebbari/.rvm/rubies/ruby-1.9.2-p290/bin:/Users/khalid_jebbari/.rvm/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin"
GEM_HOME: "/Users/khalid_jebbari/.rvm/gems/ruby-1.9.2-p290"
GEM_PATH: "/Users/khalid_jebbari/.rvm/gems/ruby-1.9.2-p290:/Users/khalid_jebbari/.rvm/gems/ruby-1.9.2-p290@global"
MY_RUBY_HOME: "/Users/khalid_jebbari/.rvm/rubies/ruby-1.9.2-p290"
IRBRC: "/Users/khalid_jebbari/.rvm/rubies/ruby-1.9.2-p290/.irbrc"
RUBYOPT: ""
gemset: ""
-
PATH
is not set properly, my guess is you reset or preset PATH, use ruby to make it working:rvm use 1.9.2-p290
and install foreman:
gem install foreman
Originally posted 2013-08-22 12:51:14.