Ruby on Rails and RVM: Problem including external gems in my Gemfile (Rails 3)
-
29-09-2019 - |
문제
When I try to include an external gem in my Gemfile (e.g. from github), my RVM doesn't recognize the external gem. It keeps telling me to run "bundle install" even after already doing.
For example, when I log into shell and do a "bundle check", I see that all "dependencies are satisfied" but in my browser, Passenger tells me that my gem is not checked out and to "Please run bundle install
".
Just to make it clearer, doing this gives me the issues above:
gem 'thinking-sphinx',
:git => 'git://github.com/freelancing-god/thinking-sphinx.git',
:branch => 'rails3',
:require => 'thinking_sphinx'
But doing this using local gems do work:
gem 'thinking-sphinx'
The backtrace is here. Do you know what the problem could be?
해결책
Try:
gem 'thinking-sphinx', '2.0.0.rc2', :require => 'thinking_sphinx'
It's always best to require a specific gem version, rather than just checking out master or a branch still in development.
다른 팁
Your application is probably not running as the intended user.