1

(https://github.com/prove/tarantula)のドキュメントを使用して、Fedora(カーネル3.6.5-2.fc16.x86_64)にTarantula( http://www.testiatarantula.com/ )をインストールしようとしています。

私が遭遇した問題はRubyエラー(A)です:

/opt/tarantula/config/initializers/session_store.rb:3: syntax error, unexpected ':', 
expecting $end ...sion_store :cookie_store, key: '_tarantula_session'
                                              ^

Tasks: TOP => db:schema:load => environment
(See full trace by running task with --trace)

コマンドを実行するとき:

 sudo RAILS_ENV=test bundle exec rake tarantula:install

The

 bundle exec

コマンドは別のエラーを克服するために使用されます(B):

sudo RAILS_ENV=production rake tarantula:install 
[sudo] password for admin: 
rake aborted!
You have already activated rake 10.0.2, but your Gemfile requires rake 0.9.2.2. Using   
bundle exec may solve this.
/opt/tarantula/config/boot.rb:6
/opt/tarantula/config/application.rb:1
/opt/tarantula/Rakefile:5
(See full trace by running task with --trace)

エラー(A)は、 https://github.com/prove/tarantula/blob/master/config/initializers/session_store.rbまでさかのぼることができます。

使用する

--trace

出力は次のとおりです。

sudo RAILS_ENV=production rake tarantula:install --trace
rake aborted!
You have already activated rake 10.0.2, but your Gemfile requires rake 0.9.2.2. Using bundle exec may solve this.
/usr/lib/ruby/gems/1.8/gems/bundler-1.2.2/lib/bundler/runtime.rb:31:in `setup'
/usr/lib/ruby/gems/1.8/gems/bundler-1.2.2/lib/bundler/runtime.rb:17:in `setup'
/usr/lib/ruby/gems/1.8/gems/bundler-1.2.2/lib/bundler.rb:116:in `setup'
/usr/lib/ruby/gems/1.8/gems/bundler-1.2.2/lib/bundler/setup.rb:7
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:59:in `require'
/opt/tarantula/config/boot.rb:6
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/opt/tarantula/config/application.rb:1
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/opt/tarantula/Rakefile:5
/usr/lib/ruby/gems/1.8/gems/rake-10.0.2/lib/rake/rake_module.rb:25:in `load'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:581:in `raw_load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:87:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:158:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:86:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:70:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:158:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:68:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.2/bin/rake:37
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
4

2 に答える 2

0

Gemfileで使用するrakeのバージョンを指定します。

gem 'rake', '=0.9.2.2'

bundle update

于 2012-11-19T19:47:02.257 に答える
0

session_store.rbこの行で試してみてください:

Tarantula::Application.config.session_store :cookie_store, :key => '_tarantula_session'

実行しているRubyバージョンは何ですか?1.8.7だと思いますか?

ruby -vRubyバージョンの場合。

編集

そしてwrap_parameters.rbこれを8行目で:

wrap_parameters :format => [:json] 
于 2012-11-19T20:55:27.513 に答える