2

I have this in my seeds file

 require 'rubygems'
 require 'yajl'

and I keep getting this error

 rake aborted!
 no such file to load -- yajl

Tasks: TOP => db:seed (See full trace by running task with --trace)

The code works when I run it outside of the seeds file. Is there some reason that I cant require the gem in the seeds file?

btw: Rails 3.0.9 / ruby 1.9.2

p01nd3xt3r
  • 821
  • 1
  • 9
  • 19

1 Answers1

2

Add the following to your Gemfile

gem "yajl-ruby"
Sam
  • 6,240
  • 4
  • 42
  • 53