thinkfuture thinkfuture - 6 months ago 7
Ruby Question

No such file to load -- json (LoadError)

Everything was working fine on this app, and now today I get this when I try to push to Heroku:

Counting objects: 28, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (22/22), done.
Writing objects: 100% (22/22), 2.20 KiB, done.
Total 22 (delta 14), reused 0 (delta 0)
/app/slug-compiler/lib/slug.rb:12:in `require': no such file to load -- json (LoadError)
from /app/slug-compiler/lib/slug.rb:12
from /app/slug-compiler/bin/slugc:14:in `require'
from /app/slug-compiler/bin/slugc:14
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to ''

Very strange - couldn't find anything on this error anywhere - and its running fine locally...


Try this:

require 'rubygems'
require 'json'