2

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

huug
  • 1,059
  • 2
  • 11
  • 25
  • 1
    Are you sure you have `thinking-sphinx` installed? what does `gem list --local | grep thinking` return? – jpemberthy Aug 09 '10 at 22:27
  • Thinking sphinx is installed and working fine... only when running script commands like script/console this annoying error message appears. – huug Aug 10 '10 at 07:40

1 Answers1

7

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'
Lytol
  • 970
  • 6
  • 15