views:

114

answers:

1

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

+3  A: 

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
Lytol, thank you soooooooooooo much!
huug
Just had the same problem. Nice catch :)
atmorell