2011-08-01 75 views
0

隨着Padrino,我創建了一個項目與Shoulda作爲測試框架。然後,我撤回並刪除了Shoulda並添加了RSpec。但是,在添加spec/spec.rakespec/spec_helper.rb後,我無法運行測試。帕德里諾與RSpec:「bundler:命令未找到:rspec」

$ padrino rake spec 
=> Executing Rake spec ... 
/home/ethan/.rvm/rubies/ruby-1.9.2-head/bin/ruby -S bundle exec rspec -fs --color ./spec/models/user_spec.rb 
bundler: command not found: rspec 
Install missing gem binaries with `bundle install` 
rake aborted! 
ruby -S bundle exec rspec -fs --color ./spec/models/user_spec.rb failed 

Tasks: TOP => spec => spec:models 
(See full trace by running task with --trace) 

Gemfile

source :rubygems 

# Server requirements 
# gem 'thin' or mongrel 
gem 'thin' 

# Project requirements 
gem 'rake' 
gem 'rack-flash' 

# Component requirements 
gem 'haml' 
gem 'mongo_mapper' 
gem 'bson_ext', :require => "mongo" 
gem 'canable' 
gem 'httparty' 
gem 'maruku' 

# Test requirements 
gem 'rspec', :group => "test" 
gem 'rack-test', :require => "rack/test", :group => "test" 


# Padrino 
gem 'padrino', '0.10.0' 
# Padrino EDGE 
# gem 'padrino', :git => 'git://github.com/padrino/padrino-framework.git' 
# 
# Individual GEMS 
# gem 'padrino-core', '0.10.0' 
# gem 'padrino-admin', '0.10.0' 
# gem 'padrino-cache', '0.10.0' 
# gem 'padrino-core', '0.10.0' 
# gem 'padrino-gen', '0.10.0' 
# gem 'padrino-helpers', '0.10.0' 
# gem 'padrino-mailer', '0.10.0' 

Gemfile.lock

GEM 
    remote: http://rubygems.org/ 
    specs: 
    activemodel (3.0.9) 
     activesupport (= 3.0.9) 
     builder (~> 2.1.2) 
     i18n (~> 0.5.0) 
    activesupport (3.0.9) 
    bson (1.3.1) 
    bson_ext (1.3.1) 
    builder (2.1.2) 
    canable (0.2.0) 
    crack (0.1.8) 
    daemons (1.1.4) 
    diff-lcs (1.1.2) 
    eventmachine (0.12.10) 
    grit (2.4.1) 
     diff-lcs (~> 1.1) 
     mime-types (~> 1.15) 
    haml (3.1.2) 
    http_router (0.8.11) 
     rack (>= 1.0.0) 
     url_mount (~> 0.2.1) 
    httparty (0.7.8) 
     crack (= 0.1.8) 
    i18n (0.5.0) 
    mail (2.3.0) 
     i18n (>= 0.4.0) 
     mime-types (~> 1.16) 
     treetop (~> 1.4.8) 
    maruku (0.6.0) 
     syntax (>= 1.0.0) 
    mime-types (1.16) 
    mongo (1.3.1) 
     bson (>= 1.3.1) 
    mongo_mapper (0.9.1) 
     activemodel (~> 3.0) 
     activesupport (~> 3.0) 
     plucky (~> 0.3.8) 
    padrino (0.10.0) 
     padrino-admin (= 0.10.0) 
     padrino-cache (= 0.10.0) 
     padrino-core (= 0.10.0) 
     padrino-gen (= 0.10.0) 
     padrino-helpers (= 0.10.0) 
     padrino-mailer (= 0.10.0) 
    padrino-admin (0.10.0) 
     padrino-core (= 0.10.0) 
     padrino-helpers (= 0.10.0) 
    padrino-cache (0.10.0) 
     padrino-core (= 0.10.0) 
    padrino-core (0.10.0) 
     activesupport (~> 3.0.0) 
     http_router (~> 0.8.10) 
     sinatra (~> 1.2.6) 
     thor (~> 0.14.3) 
     tilt (~> 1.3.0) 
    padrino-gen (0.10.0) 
     bundler (~> 1.0.2) 
     grit (~> 2.4.1) 
     padrino-core (= 0.10.0) 
    padrino-helpers (0.10.0) 
     i18n (~> 0.5.0) 
     padrino-core (= 0.10.0) 
    padrino-mailer (0.10.0) 
     mail (~> 2.3.0) 
     padrino-core (= 0.10.0) 
    plucky (0.3.8) 
     mongo (~> 1.3) 
    polyglot (0.3.2) 
    rack (1.3.2) 
    rack-flash (0.1.2) 
     rack 
    rack-test (0.6.1) 
     rack (>= 1.0) 
    rake (0.9.2) 
    rspec (2.6.0) 
     rspec-core (~> 2.6.0) 
     rspec-expectations (~> 2.6.0) 
     rspec-mocks (~> 2.6.0) 
    rspec-core (2.6.4) 
    rspec-expectations (2.6.0) 
     diff-lcs (~> 1.1.2) 
    rspec-mocks (2.6.0) 
    sinatra (1.2.6) 
     rack (~> 1.1) 
     tilt (< 2.0, >= 1.2.2) 
    syntax (1.0.0) 
    thin (1.2.11) 
     daemons (>= 1.0.9) 
     eventmachine (>= 0.12.6) 
     rack (>= 1.0.0) 
    thor (0.14.6) 
    tilt (1.3.2) 
    treetop (1.4.10) 
     polyglot 
     polyglot (>= 0.3.1) 
    url_mount (0.2.1) 
     rack 

PLATFORMS 
    ruby 

DEPENDENCIES 
    bson_ext 
    canable 
    haml 
    httparty 
    maruku 
    mongo_mapper 
    padrino (= 0.10.0) 
    rack-flash 
    rack-test 
    rake 
    rspec 
    thin 

整個項目on Github

回答

0

我清空我的gemsetrvm gemset empty)然後重新捆綁,一切都很順利。奇。

0

嘗試用

PADRINO_ENV=test rake spec

或編輯你的寶石文件中刪除測試組。

相關問題