I did a bundle show and get the complete path to a gem directory.
Unfortunately, I removed the directory using rm -r gem_path. Then my rails app isn’t working anymore. If I try start server or start rails console it outputs the following error:
<class:Application>: uninitialized constantMyAPP::Application::Gem(NameError)
What should I do to have it back?
I tried bundle install or bundle update in hope of forcing the bundle to search the gem and install it back, but didn’t work.
I also tried delete the Gemfile.lock and run bundle install. Nothing changed, same error.
The gem in question is Act as taggable on.
First I did a
gem q --L, the shortcut forgem query --local. It outputs me the all the local gems installed.And then, following DVG advice, I uninstalled the gem using its correct name
gem uninstall acts-as-taggable-onand ranbundle install. After that I was able torails corrails sagain without any problem.