Rspec2、Rails3、Authlogic:无法运行规范

发布于 2024-10-09 05:40:20 字数 11899 浏览 1 评论 0原文

当我

rspec spec

在我的 Rails 项目中这样做时,我得到

No examples were matched. Perhaps {:if=>#<Proc:0x0000010126e998@/Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/configuration.rb:50 (lambda)>, :unless=>#<Proc:0x0000010126e970@/Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/configuration.rb:51 (lambda)>} is excluding everything?


Finished in 0.00004 seconds
0 examples, 0 failures

现在,这看起来也许如果我写了一个规范它会起作用,但是一旦我写了一个规范(并且我确实包含了spec_helper)

/Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/backward_compatibility.rb:20:in `const_missing': uninitialized constant Authlogic (NameError)
    from /{myapp}/app/models/user_session.rb:1:in `<top (required)>'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/engine.rb:138:in `block (2 levels) in eager_load!'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/engine.rb:137:in `each'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/engine.rb:137:in `block in eager_load!'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/engine.rb:135:in `each'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/engine.rb:135:in `eager_load!'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/application.rb:108:in `eager_load!'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/application/finisher.rb:41:in `block in <module:Finisher>'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `instance_exec'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `run'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/initializable.rb:50:in `block in run_initializers'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `each'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `run_initializers'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/application.rb:134:in `initialize!'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/application.rb:77:in `method_missing'
    from /{myapp}/config/environment.rb:5:in `<top (required)>'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /{myapp}/spec/spec_helper.rb:3:in `<top (required)>'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /{myapp}/spec/controllers/pages_controller_spec.rb:1:in `<top (required)>'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/configuration.rb:388:in `load'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/configuration.rb:388:in `block in load_spec_files'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/configuration.rb:388:in `map'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/configuration.rb:388:in `load_spec_files'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/command_line.rb:18:in `run'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/runner.rb:55:in `run_in_process'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/runner.rb:46:in `run'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/runner.rb:10:in `block in autorun'

这里重要的一行似乎是

/core/backward_compatibility.rb:20:in `const_missing': uninitialized constant Authlogic (NameError)

现在如果这个是 Rails 2.3.8,我简单地说 config.gem“authlogic”

进入environment.rb,在初始化代码块中。但是,rails 3environment.rb 看起来很不同(没有配置代码块,因此任意放入它会导致未定义配置的错误)。所以我的问题是

1)我实际上必须将 gem 配置放在任何地方吗?我查看了 https://github.com/trevmex/authlogic_rails3_example/ ,看来他没有把它放在任何地方。

2)有谁知道我在rspec方面做错了什么?我的 gem 列表是

    *** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2, 2.3.4)
actionpack (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2, 2.3.4)
activemodel (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2)
activerecord (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2, 2.3.4)
activeresource (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2, 2.3.4)
activesupport (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2, 2.3.4)
arel (2.0.6, 1.0.1)
asdf (0.5.0)
authlogic (2.1.6, 2.1.3)
autotest (4.4.6, 4.4.1)
autotest-fsevent (0.2.4)
autotest-growl (0.2.9)
autotest-rails (4.1.0)
autotest-rails-pure (4.1.2)
bluecloth (2.0.9)
builder (2.1.2)
bundler (1.0.7, 1.0.2)
cgi_multipart_eof_fix (2.5.0)
commonwatir (1.6.2)
couchrest (0.33)
cri (1.0.1)
cucumber (0.4.4, 0.4.3, 0.3.11)
daemons (1.1.0, 1.0.10)
dependencies (0.0.7)
diff-lcs (1.1.2)
erubis (2.6.6)
fastercsv (1.5.0)
fastthread (1.0.7)
firewatir (1.6.2)
flay (1.4.0)
flog (2.2.0)
funfx (0.2.2)
gem_plugin (0.2.3)
gemsonrails (0.7.2)
giraffesoft-resource_controller (0.6.5)
haml (2.2.14)
hoe (2.3.3)
i18n (0.4.1)
jscruggs-metric_fu (1.1.5)
json_pure (1.1.9)
kramdown (0.12.0)
mail (2.2.13, 2.2.6.1)
memcache-client (1.8.5)
mime-types (1.16)
mojombo-chronic (0.3.0)
mongrel (1.1.5)
monk (0.0.7)
nanoc (3.1.5)
nanoc3 (3.1.5)
nokogiri (1.4.3.1, 1.4.0)
open4 (0.9.6)
polyglot (0.3.1, 0.2.9)
rack (1.2.1, 1.0.1)
rack-mount (0.6.13)
rack-test (0.5.6)
rails (3.0.0, 2.3.4)
rails3-generators (0.17.0, 0.14.0)
railties (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2)
rake (0.8.7)
relevance-rcov (0.9.2.1)
rest-client (1.0.3)
rspec (2.3.0, 2.0.0.rc, 1.2.9)
rspec-core (2.3.1, 2.0.0.rc)
rspec-expectations (2.3.0, 2.0.0.rc)
rspec-mocks (2.3.0, 2.0.0.rc)
rspec-rails (2.3.1, 2.0.0.rc, 1.2.9)
ruby_parser (2.0.4)
rubyforge (2.0.3)
rubygems-update (1.3.6, 1.3.5)
rvm (1.0.13)
s4t-utils (1.0.4)
safariwatir (0.3.7)
sexp_processor (3.0.3)
spork (0.7.3)
sqlite3-ruby (1.3.1, 1.2.5)
sys-uname (0.8.5)
term-ansicolor (1.0.4)
text-format (1.0.0)
text-hyphen (1.0.0)
thor (0.14.6, 0.14.3, 0.12.0)
treetop (1.4.8, 1.4.2)
tzinfo (0.3.23)
user-choices (1.1.6)
vlad (2.0.0)
vlad-git (2.1.0)
webrat (0.7.1, 0.6.0, 0.5.3)
xml-simple (1.0.12)
ZenTest (4.4.2)

我正在使用在 OSX 10.6 Snow Leopard 上使用 RVM 安装的 ruby​​ 1.9.2 和 Rails 3.0.3。

我只是希望能够像以前一样运行我的规格。作为一个单独的问题,自动测试会产生一个关于包含自动测试/咆哮的错误,但我安装了自动测试咆哮。也许这是一个宝石问题?我尝试做同样的事情,但在使用我的 ubuntu 10.04 服务器机器时遇到了同样的错误。

Gemfile

source 'http://rubygems.org'

gem 'rails', '3.0.3'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3-ruby', :require => 'sqlite3'

group :couch do
    gem 'couchrest'
end

group :user_auth do
  gem 'authlogic'
  gem "rails3-generators"
  gem 'facebooker'
end

group :markup do
  gem 'haml'
  gem 'sass'
end

group :testing do
  gem 'rspec-rails'
  gem 'rspec'
  gem 'webrat'
  gem 'cucumber'
  gem 'capybara'
  gem 'factory_girl'
  gem 'shoulda'
  gem 'autotest'
end

group :server do
  gem 'unicorn'
end
# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug'

# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'

# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
#   gem 'webrat'
# end

Gemfile.lock

GEM
  remote: http://rubygems.org/
  specs:
    ZenTest (4.4.2)
    abstract (1.0.0)
    actionmailer (3.0.3)
      actionpack (= 3.0.3)
      mail (~> 2.2.9)
    actionpack (3.0.3)
      activemodel (= 3.0.3)
      activesupport (= 3.0.3)
      builder (~> 2.1.2)
      erubis (~> 2.6.6)
      i18n (~> 0.4)
      rack (~> 1.2.1)
      rack-mount (~> 0.6.13)
      rack-test (~> 0.5.6)
      tzinfo (~> 0.3.23)
    activemodel (3.0.3)
      activesupport (= 3.0.3)
      builder (~> 2.1.2)
      i18n (~> 0.4)
    activerecord (3.0.3)
      activemodel (= 3.0.3)
      activesupport (= 3.0.3)
      arel (~> 2.0.2)
      tzinfo (~> 0.3.23)
    activeresource (3.0.3)
      activemodel (= 3.0.3)
      activesupport (= 3.0.3)
    activesupport (3.0.3)
    arel (2.0.6)
    authlogic (2.1.6)
      activesupport
    autotest (4.4.6)
      ZenTest (>= 4.4.1)
    builder (2.1.2)
    capybara (0.4.0)
      celerity (>= 0.7.9)
      culerity (>= 0.2.4)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      selenium-webdriver (>= 0.0.27)
      xpath (~> 0.1.2)
    celerity (0.8.6)
    childprocess (0.1.6)
      ffi (~> 0.6.3)
    couchrest (1.0.1)
      json (>= 1.4.6)
      mime-types (>= 1.15)
      rest-client (>= 1.5.1)
    cucumber (0.10.0)
      builder (>= 2.1.2)
      diff-lcs (~> 1.1.2)
      gherkin (~> 2.3.2)
      json (~> 1.4.6)
      term-ansicolor (~> 1.0.5)
    culerity (0.2.13)
    diff-lcs (1.1.2)
    erubis (2.6.6)
      abstract (>= 1.0.0)
    facebooker (1.0.75)
      json_pure (>= 1.0.0)
    factory_girl (1.3.2)
    ffi (0.6.3)
      rake (>= 0.8.7)
    gherkin (2.3.2)
      json (~> 1.4.6)
      term-ansicolor (~> 1.0.5)
    haml (3.0.25)
    i18n (0.5.0)
    json (1.4.6)
    json_pure (1.4.6)
    kgio (2.0.0)
    mail (2.2.13)
      activesupport (>= 2.3.6)
      i18n (>= 0.4.0)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.16)
    nokogiri (1.4.4)
    polyglot (0.3.1)
    rack (1.2.1)
    rack-mount (0.6.13)
      rack (>= 1.0.0)
    rack-test (0.5.6)
      rack (>= 1.0)
    rails (3.0.3)
      actionmailer (= 3.0.3)
      actionpack (= 3.0.3)
      activerecord (= 3.0.3)
      activeresource (= 3.0.3)
      activesupport (= 3.0.3)
      bundler (~> 1.0)
      railties (= 3.0.3)
    rails3-generators (0.17.0)
      railties (>= 3.0.0)
    railties (3.0.3)
      actionpack (= 3.0.3)
      activesupport (= 3.0.3)
      rake (>= 0.8.7)
      thor (~> 0.14.4)
    rake (0.8.7)
    rest-client (1.6.1)
      mime-types (>= 1.16)
    rspec (2.3.0)
      rspec-core (~> 2.3.0)
      rspec-expectations (~> 2.3.0)
      rspec-mocks (~> 2.3.0)
    rspec-core (2.3.1)
    rspec-expectations (2.3.0)
      diff-lcs (~> 1.1.2)
    rspec-mocks (2.3.0)
    rspec-rails (2.3.1)
      actionpack (~> 3.0)
      activesupport (~> 3.0)
      railties (~> 3.0)
      rspec (~> 2.3.0)
    rubyzip (0.9.4)
    sass (3.1.0.alpha.206)
    selenium-webdriver (0.1.2)
      childprocess (~> 0.1.5)
      ffi (~> 0.6.3)
      json_pure
      rubyzip
    shoulda (2.11.3)
    sqlite3-ruby (1.3.2)
    term-ansicolor (1.0.5)
    thor (0.14.6)
    treetop (1.4.9)
      polyglot (>= 0.3.1)
    tzinfo (0.3.23)
    unicorn (3.1.0)
      kgio (~> 2.0.0)
      rack
    webrat (0.7.2)
      nokogiri (>= 1.2.0)
      rack (>= 1.0)
      rack-test (>= 0.5.3)
    xpath (0.1.2)
      nokogiri (~> 1.3)

PLATFORMS
  ruby

DEPENDENCIES
  authlogic
  autotest
  capybara
  couchrest
  cucumber
  facebooker
  factory_girl
  haml
  rails (= 3.0.3)
  rails3-generators
  rspec
  rspec-rails
  sass
  shoulda
  sqlite3-ruby
  unicorn
  webrat

When I do

rspec spec

in my rails project, I get

No examples were matched. Perhaps {:if=>#<Proc:0x0000010126e998@/Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/configuration.rb:50 (lambda)>, :unless=>#<Proc:0x0000010126e970@/Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/configuration.rb:51 (lambda)>} is excluding everything?


Finished in 0.00004 seconds
0 examples, 0 failures

Now, this seems like maybe if I wrote a spec it would work, but as soon as I write a spec (and I do include spec_helper)

/Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/backward_compatibility.rb:20:in `const_missing': uninitialized constant Authlogic (NameError)
    from /{myapp}/app/models/user_session.rb:1:in `<top (required)>'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/engine.rb:138:in `block (2 levels) in eager_load!'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/engine.rb:137:in `each'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/engine.rb:137:in `block in eager_load!'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/engine.rb:135:in `each'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/engine.rb:135:in `eager_load!'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/application.rb:108:in `eager_load!'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/application/finisher.rb:41:in `block in <module:Finisher>'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `instance_exec'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `run'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/initializable.rb:50:in `block in run_initializers'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `each'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `run_initializers'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/application.rb:134:in `initialize!'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/railties-3.0.3/lib/rails/application.rb:77:in `method_missing'
    from /{myapp}/config/environment.rb:5:in `<top (required)>'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /{myapp}/spec/spec_helper.rb:3:in `<top (required)>'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from /{myapp}/spec/controllers/pages_controller_spec.rb:1:in `<top (required)>'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/configuration.rb:388:in `load'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/configuration.rb:388:in `block in load_spec_files'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/configuration.rb:388:in `map'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/configuration.rb:388:in `load_spec_files'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/command_line.rb:18:in `run'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/runner.rb:55:in `run_in_process'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/runner.rb:46:in `run'
    from /Users/samliu/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rspec-core-2.3.1/lib/rspec/core/runner.rb:10:in `block in autorun'

The important line here seems to be

/core/backward_compatibility.rb:20:in `const_missing': uninitialized constant Authlogic (NameError)

Now if this were rails 2.3.8, I'd simply put
config.gem "authlogic"

into the environment.rb, in the initialization code block. However, the rails 3 environment.rb looks way different (there is no config code block, so putting it in arbitrarily causes an error where config is not defined). So my questions are

1) Do I actually have to put the gem config anywhere? I looked at https://github.com/trevmex/authlogic_rails3_example/ and it seems he didn't put it anywhere.

2) Does anyone know what I'm doing wrong in terms of rspec? My gem list is

    *** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2, 2.3.4)
actionpack (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2, 2.3.4)
activemodel (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2)
activerecord (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2, 2.3.4)
activeresource (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2, 2.3.4)
activesupport (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2, 2.3.4)
arel (2.0.6, 1.0.1)
asdf (0.5.0)
authlogic (2.1.6, 2.1.3)
autotest (4.4.6, 4.4.1)
autotest-fsevent (0.2.4)
autotest-growl (0.2.9)
autotest-rails (4.1.0)
autotest-rails-pure (4.1.2)
bluecloth (2.0.9)
builder (2.1.2)
bundler (1.0.7, 1.0.2)
cgi_multipart_eof_fix (2.5.0)
commonwatir (1.6.2)
couchrest (0.33)
cri (1.0.1)
cucumber (0.4.4, 0.4.3, 0.3.11)
daemons (1.1.0, 1.0.10)
dependencies (0.0.7)
diff-lcs (1.1.2)
erubis (2.6.6)
fastercsv (1.5.0)
fastthread (1.0.7)
firewatir (1.6.2)
flay (1.4.0)
flog (2.2.0)
funfx (0.2.2)
gem_plugin (0.2.3)
gemsonrails (0.7.2)
giraffesoft-resource_controller (0.6.5)
haml (2.2.14)
hoe (2.3.3)
i18n (0.4.1)
jscruggs-metric_fu (1.1.5)
json_pure (1.1.9)
kramdown (0.12.0)
mail (2.2.13, 2.2.6.1)
memcache-client (1.8.5)
mime-types (1.16)
mojombo-chronic (0.3.0)
mongrel (1.1.5)
monk (0.0.7)
nanoc (3.1.5)
nanoc3 (3.1.5)
nokogiri (1.4.3.1, 1.4.0)
open4 (0.9.6)
polyglot (0.3.1, 0.2.9)
rack (1.2.1, 1.0.1)
rack-mount (0.6.13)
rack-test (0.5.6)
rails (3.0.0, 2.3.4)
rails3-generators (0.17.0, 0.14.0)
railties (3.0.3, 3.0.1, 3.0.0, 3.0.0.rc2)
rake (0.8.7)
relevance-rcov (0.9.2.1)
rest-client (1.0.3)
rspec (2.3.0, 2.0.0.rc, 1.2.9)
rspec-core (2.3.1, 2.0.0.rc)
rspec-expectations (2.3.0, 2.0.0.rc)
rspec-mocks (2.3.0, 2.0.0.rc)
rspec-rails (2.3.1, 2.0.0.rc, 1.2.9)
ruby_parser (2.0.4)
rubyforge (2.0.3)
rubygems-update (1.3.6, 1.3.5)
rvm (1.0.13)
s4t-utils (1.0.4)
safariwatir (0.3.7)
sexp_processor (3.0.3)
spork (0.7.3)
sqlite3-ruby (1.3.1, 1.2.5)
sys-uname (0.8.5)
term-ansicolor (1.0.4)
text-format (1.0.0)
text-hyphen (1.0.0)
thor (0.14.6, 0.14.3, 0.12.0)
treetop (1.4.8, 1.4.2)
tzinfo (0.3.23)
user-choices (1.1.6)
vlad (2.0.0)
vlad-git (2.1.0)
webrat (0.7.1, 0.6.0, 0.5.3)
xml-simple (1.0.12)
ZenTest (4.4.2)

I am using ruby 1.9.2 and rails 3.0.3 installed using RVM on OSX 10.6 Snow Leopard.

I just want to be able to run my specs like I used to. As a separate issue, autotest yields an error about an include for autotest/growl but I installed autotest-growl. Maybe this is a gem issue? I tried doing the same things and get the same error when it comes to using my ubuntu 10.04 server machine though.

Gemfile

source 'http://rubygems.org'

gem 'rails', '3.0.3'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3-ruby', :require => 'sqlite3'

group :couch do
    gem 'couchrest'
end

group :user_auth do
  gem 'authlogic'
  gem "rails3-generators"
  gem 'facebooker'
end

group :markup do
  gem 'haml'
  gem 'sass'
end

group :testing do
  gem 'rspec-rails'
  gem 'rspec'
  gem 'webrat'
  gem 'cucumber'
  gem 'capybara'
  gem 'factory_girl'
  gem 'shoulda'
  gem 'autotest'
end

group :server do
  gem 'unicorn'
end
# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug'

# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'

# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
#   gem 'webrat'
# end

Gemfile.lock

GEM
  remote: http://rubygems.org/
  specs:
    ZenTest (4.4.2)
    abstract (1.0.0)
    actionmailer (3.0.3)
      actionpack (= 3.0.3)
      mail (~> 2.2.9)
    actionpack (3.0.3)
      activemodel (= 3.0.3)
      activesupport (= 3.0.3)
      builder (~> 2.1.2)
      erubis (~> 2.6.6)
      i18n (~> 0.4)
      rack (~> 1.2.1)
      rack-mount (~> 0.6.13)
      rack-test (~> 0.5.6)
      tzinfo (~> 0.3.23)
    activemodel (3.0.3)
      activesupport (= 3.0.3)
      builder (~> 2.1.2)
      i18n (~> 0.4)
    activerecord (3.0.3)
      activemodel (= 3.0.3)
      activesupport (= 3.0.3)
      arel (~> 2.0.2)
      tzinfo (~> 0.3.23)
    activeresource (3.0.3)
      activemodel (= 3.0.3)
      activesupport (= 3.0.3)
    activesupport (3.0.3)
    arel (2.0.6)
    authlogic (2.1.6)
      activesupport
    autotest (4.4.6)
      ZenTest (>= 4.4.1)
    builder (2.1.2)
    capybara (0.4.0)
      celerity (>= 0.7.9)
      culerity (>= 0.2.4)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      selenium-webdriver (>= 0.0.27)
      xpath (~> 0.1.2)
    celerity (0.8.6)
    childprocess (0.1.6)
      ffi (~> 0.6.3)
    couchrest (1.0.1)
      json (>= 1.4.6)
      mime-types (>= 1.15)
      rest-client (>= 1.5.1)
    cucumber (0.10.0)
      builder (>= 2.1.2)
      diff-lcs (~> 1.1.2)
      gherkin (~> 2.3.2)
      json (~> 1.4.6)
      term-ansicolor (~> 1.0.5)
    culerity (0.2.13)
    diff-lcs (1.1.2)
    erubis (2.6.6)
      abstract (>= 1.0.0)
    facebooker (1.0.75)
      json_pure (>= 1.0.0)
    factory_girl (1.3.2)
    ffi (0.6.3)
      rake (>= 0.8.7)
    gherkin (2.3.2)
      json (~> 1.4.6)
      term-ansicolor (~> 1.0.5)
    haml (3.0.25)
    i18n (0.5.0)
    json (1.4.6)
    json_pure (1.4.6)
    kgio (2.0.0)
    mail (2.2.13)
      activesupport (>= 2.3.6)
      i18n (>= 0.4.0)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.16)
    nokogiri (1.4.4)
    polyglot (0.3.1)
    rack (1.2.1)
    rack-mount (0.6.13)
      rack (>= 1.0.0)
    rack-test (0.5.6)
      rack (>= 1.0)
    rails (3.0.3)
      actionmailer (= 3.0.3)
      actionpack (= 3.0.3)
      activerecord (= 3.0.3)
      activeresource (= 3.0.3)
      activesupport (= 3.0.3)
      bundler (~> 1.0)
      railties (= 3.0.3)
    rails3-generators (0.17.0)
      railties (>= 3.0.0)
    railties (3.0.3)
      actionpack (= 3.0.3)
      activesupport (= 3.0.3)
      rake (>= 0.8.7)
      thor (~> 0.14.4)
    rake (0.8.7)
    rest-client (1.6.1)
      mime-types (>= 1.16)
    rspec (2.3.0)
      rspec-core (~> 2.3.0)
      rspec-expectations (~> 2.3.0)
      rspec-mocks (~> 2.3.0)
    rspec-core (2.3.1)
    rspec-expectations (2.3.0)
      diff-lcs (~> 1.1.2)
    rspec-mocks (2.3.0)
    rspec-rails (2.3.1)
      actionpack (~> 3.0)
      activesupport (~> 3.0)
      railties (~> 3.0)
      rspec (~> 2.3.0)
    rubyzip (0.9.4)
    sass (3.1.0.alpha.206)
    selenium-webdriver (0.1.2)
      childprocess (~> 0.1.5)
      ffi (~> 0.6.3)
      json_pure
      rubyzip
    shoulda (2.11.3)
    sqlite3-ruby (1.3.2)
    term-ansicolor (1.0.5)
    thor (0.14.6)
    treetop (1.4.9)
      polyglot (>= 0.3.1)
    tzinfo (0.3.23)
    unicorn (3.1.0)
      kgio (~> 2.0.0)
      rack
    webrat (0.7.2)
      nokogiri (>= 1.2.0)
      rack (>= 1.0)
      rack-test (>= 0.5.3)
    xpath (0.1.2)
      nokogiri (~> 1.3)

PLATFORMS
  ruby

DEPENDENCIES
  authlogic
  autotest
  capybara
  couchrest
  cucumber
  facebooker
  factory_girl
  haml
  rails (= 3.0.3)
  rails3-generators
  rspec
  rspec-rails
  sass
  shoulda
  sqlite3-ruby
  unicorn
  webrat

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

荆棘i 2024-10-16 05:40:20

所有 config.gem 现在都在 Gemfile 中。所以穿上它:

gem 'authologic'

All you config.gem are now in your Gemfile. So put it on :

gem 'authologic'
煮茶煮酒煮时光 2024-10-16 05:40:20

解决了。不完全确定问题是什么,但我从系统中卸载了 ruby​​gems 和 ruby​​,并仅使用 rvm 重新安装 - 然后我使用 devise 代替 authlogic。似乎出于某种原因 authlogic 对我的态度不太好。那好吧。

Solved. Not entirely sure what the issue was, but I uninstalled rubygems and ruby from the system and reinstalled only using rvm -- then I went with devise over authlogic. Seems that for some reason authlogic just wasn't playing nice with me. Oh well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文