Ruby on rails 使用RVM创建文件

Ruby on rails 使用RVM创建文件,ruby-on-rails,rvm,bundler,thinking-sphinx,Ruby On Rails,Rvm,Bundler,Thinking Sphinx,我有一个rails 2.3.8应用程序。我刚刚安装了RVM,显然一切正常(我创建了一个非常简单的rails项目来检查rails和mysql是否正常运行) 我现在正在尝试创建一个文件。。。但是我在思考斯芬克斯时遇到了一个问题。以下是我的文件的当前版本: source :rubygems source "http://rubygems.org" source :rubyforge source "http://gems.rubyforge.org" source :gemcutter source

我有一个rails 2.3.8应用程序。我刚刚安装了RVM,显然一切正常(我创建了一个非常简单的rails项目来检查rails和mysql是否正常运行)

我现在正在尝试创建一个文件。。。但是我在思考斯芬克斯时遇到了一个问题。以下是我的文件的当前版本:

source :rubygems
source "http://rubygems.org"
source :rubyforge
source "http://gems.rubyforge.org"
source :gemcutter
source "http://gemcutter.org"

gem 'SystemTimer', :platforms => :ruby_18
gem "rails", "2.3.5"
# make sure to run "bundle config build.mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config" in terminal before running "bundle install" as per documentation in http://gembundler.com/man/bundle-config.1.html
gem "mysql"

gem "tlsmail"
gem 'delayed_job'
gem 'will_paginate', '~> 2.3.11'

gem "chronic"
gem "nokogiri"

gem "sphinx", '0.9.10.2122'
gem 'thinking-sphinx', '< 2.0.0', :require => 'thinking_sphinx'
gem 'ts-delayed-delta', :require => 'thinking_sphinx/deltas/delayed_delta'

gem "mini_magick"
gem "faker"
gem "populator"

gem "rspec"
gem "geokit"
gem "geokit-rails"
当我跑的时候

rake ts:config

我收到以下错误消息:

rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)

Sphinx cannot be found on your system. You may need to configure the following
settings in your config/sphinx.yml file:
  * bin_path
  * searchd_binary_name
  * indexer_binary_name


For more information, read the documentation:
http://freelancing-god.github.com/ts/en/advanced_config.html          

Generating Configuration to /Users/alex/Sites/myproject/config/development.sphinx.conf
rake aborted!
uninitialized constant ThinkingSphinx::Deltas::DelayedDelta

Tasks: TOP => ts:config => thinking_sphinx:configure
(See full trace by running task with --trace)

我已经尝试了几个小时不同的事情,但找不到解决问题的方法。。。我希望能得到一些帮助

试试
bundle exec rake ts:config


这将使用您在GEM文件中指定的版本。

我的建议是不要使用RVM。这是一个好主意,但实施不力。如果您需要像我这样的多个ruby版本,只需为每个版本创建别名就不那么麻烦了


RVM会不时引起问题,使用别名从来不会

哎哟!!!原来我忘了在我的新机器上安装斯芬克斯!。。。现在我得到的信息是:"未初始化常量ThinkingSphinx::Deltas::DelayedDelta/Users/alex/.rvm/gems/ruby-1.8.7-p174/gems/activesupport-2.3.5/lib/active\u support/dependencies.rb:440:in
load\u missing\u constant'/Users/alex/.rvm/gems/ruby-1.8.7-p174/gems/activesupport-2.3.5/lib/active\u support/dependencies.rb:80:in
const\u missing'/Users/alex/.rvm/gems/ruby-1.8.7-p174/gems/thinking-sphinx-1.4.3/lib/thinking\u sphinx/deltas.rb:11:in‘parse’。好吧,你知道该怎么办!:)出于某种原因,我似乎不得不离开“config.gem'ts delayed delta',:lib。。。“在my environment.rb文件中。这正常吗?这怎么不是一个有用的答案?它解决了他的问题,将来不会发生类似的事情。您的
Gemfile.lock
文件的内容是什么?
rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)

Sphinx cannot be found on your system. You may need to configure the following
settings in your config/sphinx.yml file:
  * bin_path
  * searchd_binary_name
  * indexer_binary_name


For more information, read the documentation:
http://freelancing-god.github.com/ts/en/advanced_config.html          

Generating Configuration to /Users/alex/Sites/myproject/config/development.sphinx.conf
rake aborted!
uninitialized constant ThinkingSphinx::Deltas::DelayedDelta

Tasks: TOP => ts:config => thinking_sphinx:configure
(See full trace by running task with --trace)