I'm trying to get rspec to start working again. When I go to test anything, I get the following:
stacyrandel$ bundle exec rspec spec/requests/static_pages_spec.rb
/Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require': /Users/stacyrandel/rails_projects/callred/app/models/user.rb:21: syntax error, unexpected ':', expecting keyword_end (SyntaxError)
uniqueness: { case_sensitive: false }
^
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:359:in `require_or_load'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:502:in `load_missing_constant'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:192:in `block in const_missing'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:190:in `each'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:190:in `const_missing'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:230:in `block in constantize'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:229:in `each'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:229:in `constantize'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:260:in `safe_constantize'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/core_ext/string/inflections.rb:66:in `safe_constantize'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:152:in `_default_wrap_model'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:169:in `_set_wrapper_defaults'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:133:in `inherited'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.8/lib/abstract_controller/railties/routes_helpers.rb:7:in `block (2 levels) in with'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.8/lib/action_controller/railties/paths.rb:7:in `block (2 levels) in with'
from /Users/stacyrandel/rails_projects/callred/app/controllers/users_controller.rb:1:in `<top (required)>'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:359:in `require_or_load'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:313:in `depend_on'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:225:in `require_dependency'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.8/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.8/lib/rails/engine.rb:438:in `each'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.8/lib/rails/engine.rb:438:in `block in eager_load!'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.8/lib/rails/engine.rb:436:in `each'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.8/lib/rails/engine.rb:436:in `eager_load!'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.8/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/stacyrandel/rails_projects/callred/config/environment.rb:5:in `<top (required)>'
from /Users/stacyrandel/rails_projects/callred/spec/spec_helper.rb:3:in `require'
from /Users/stacyrandel/rails_projects/callred/spec/spec_helper.rb:3:in `<top (required)>'
from /Users/stacyrandel/rails_projects/callred/spec/requests/static_pages_spec.rb:1:in `require'
from /Users/stacyrandel/rails_projects/callred/spec/requests/static_pages_spec.rb:1:in `<top (required)>'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `load'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `block in load_spec_files'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `map'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `load_spec_files'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:22:in `run'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:80:in `run_in_process'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:69:in `run'
from /Users/stacyrandel/.rvm/gems/ruby-1.9.3-p327/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:10:in `block in autorun'
Have a look into your source file /Users/stacyrandel/rails_projects/callred/app/models/user.rb
line 21
, make sure that uniqueness
is used in proper context according to this tutorial: http://guides.rubyonrails.org/active_record_validations_callbacks.html#uniqueness
As pointed out by @dpassage in the other answer there are differences between ruby versions:
Ruby 1.8.7:
validates :email, :uniqueness => true
Ruby 1.9+:
validates :email, uniqueness: true
But your stacktrace shows that ruby 1.9.3 was used, so it should be fine.