Wednesday, July 1, 2009

Adding acts_as_reportable to environment.rb

We're trying to make sure that our Rails app as a reproduce-able install process with required gems, and in doing so, adding the config.gem line into our environment.rb code.

For some reason, I kept getting a "gem does not exist - acts_as_reportable" error when I would then run rake gems:install.

I had the following line in my environment.rb

config.gem 'acts_as_reportable'

But no luck.

Turns out to be an easy fix, if you're really familiar with the syntax for environment.rb, which evidently I'm not. :)
Here is the proper line:

config.gem 'ruport'
config.gem 'acts_as_reportable', :lib => 'ruport'

Notice, that ruport is mentioned before it.


John said...

thanks a lot!

caleb said...

That was very helpful! Thanks :)