문제

When running script commands like script/console I get the error message:

no such file 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'
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top