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?
Try
::Grit. In 1.9, constant lookup is a bit different.