0

When I use rails c, I could type repo = Grit::Repo.name("/path/path") and there is no error.

But when I type these in my rails controller, there is a error message showing: uninitialized constant AaaController::Grit , and if I add require 'grit' , it says no such file to load -- grit.

I am sure that I have added gem 'grit' to my Gemfile and did bundle install.

What's wrong with this?

Jett Hsieh
  • 3,159
  • 27
  • 33

1 Answers1

4

Try ::Grit. In 1.9, constant lookup is a bit different.

Reactormonk
  • 21,472
  • 14
  • 74
  • 123