When running script commands like script/console I get the error message:
no such f开发者_StackOverflow社区ile to load -- thinking-sphinx
In my evironment.rb file I have:
config.gem 'thinking-sphinx', :version => '1.3.18', :require_as => 'thinking_sphinx'
In my rake file:
require 'thinking_sphinx/tasks'
I have following versions:
gem 1.3.7
ruby 1.8.7
Rails 2.3.8
My rake commands like rake ts:rebuild work fine! Is there a way to get rid of the annoying error message?
Tnx!!!
ps: I also use RVM
It looks like Rails is trying to require the gem as "thinking-sphinx" rather than as "thinking_sphinx". You need to use :lib
to specify the require path rather than :require_as
IIRC.
config.gem 'thinking-sphinx', :version => '1.3.18', :lib => 'thinking_sphinx'
精彩评论