My Code in ruby class is. Here i am getting uninitialized constant ActionDispatch (NameError)
DatabaseCleaner.strategy = :transaction
class ActionDispatch::IntegrationTest
# Make the Capybara DSL available in all integration tests
include Capybara::DSL
# Stop ActiveRecord from wrapping tests in transactions
self.use_transactional_fixtures = false
teardown do
DatabaseCleaner.clean # Truncate the database
Capybara.reset_sessions! # Forget the (simulated) browser state
Capybara.use_default_driver
end
end
I ran into the same issue, after upgrading.
This is my stack trace:
uninitialized constant ActionDispatch::IntegrationTest (NameError)
/Users/etagwerker/.rvm/gems/ruby-1.9.3-p327#ombu/gems/cucumber-rails-1.3.1/lib/cucumber/rails/world.rb:9:in `<module:Rails>'
/Users/etagwerker/.rvm/gems/ruby-1.9.3-p327#ombu/gems/cucumber-rails-1.3.1/lib/cucumber/rails/world.rb:8:in `<module:Cucumber>'
/Users/etagwerker/.rvm/gems/ruby-1.9.3-p327#ombu/gems/cucumber-rails-1.3.1/lib/cucumber/rails/world.rb:7:in `<top (required)>'
/Users/etagwerker/.rvm/gems/ruby-1.9.3-p327#ombu/gems/backports-3.3.0/lib/backports/tools.rb:328:in `require'
/Users/etagwerker/.rvm/gems/ruby-1.9.3-p327#ombu/gems/backports-3.3.0/lib/backports/tools.rb:328:in `require_with_backports'
/Users/etagwerker/Projects/om/features/support/env.rb:11:in `<top (required)>'
/Users/etagwerker/.rvm/gems/ruby-1.9.3-p327#ombu/gems/cucumber-1.3.1/lib/cucumber/rb_support/rb_language.rb:122:in `load'
/Users/etagwerker/.rvm/gems/ruby-1.9.3-p327#ombu/gems/cucumber-1.3.1/lib/cucumber/rb_support/rb_language.rb:122:in `load_code_file'
/Users/etagwerker/.rvm/gems/ruby-1.9.3-p327#ombu/gems/cucumber-1.3.1/lib/cucumber/runtime/support_code.rb:180:in `load_file'
/Users/etagwerker/.rvm/gems/ruby-1.9.3-p327#ombu/gems/cucumber-1.3.1/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/Users/etagwerker/.rvm/gems/ruby-1.9.3-p327#ombu/gems/cucumber-1.3.1/lib/cucumber/runtime/support_code.rb:82:in `each'
/Users/etagwerker/.rvm/gems/ruby-1.9.3-p327#ombu/gems/cucumber-1.3.1/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/Users/etagwerker/.rvm/gems/ruby-1.9.3-p327#ombu/gems/cucumber-1.3.1/lib/cucumber/runtime.rb:183:in `load_step_definitions'
/Users/etagwerker/.rvm/gems/ruby-1.9.3-p327#ombu/gems/cucumber-1.3.1/lib/cucumber/runtime.rb:42:in `run!'
/Users/etagwerker/.rvm/gems/ruby-1.9.3-p327#ombu/gems/cucumber-1.3.1/lib/cucumber/cli/main.rb:47:in `execute!'
/Users/etagwerker/.rvm/gems/ruby-1.9.3-p327#ombu/gems/cucumber-1.3.1/bin/cucumber:13:in `<top (required)>'
script/cucumber:9:in `load'
script/cucumber:9:in `<main>'
I am using rails 3.0.20 and cucumber-rails 1.3.1.
After trying a few things, I tried this:
rails generate cucumber:install
That solved it for me.
Related
In my ruby 2.3.1, I get this error:
=> Booting WEBrick
=> Rails 4.2.6 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/will_paginate-3.0.pre2/lib/will_paginate/railtie.rb:15:in `block in <class:Railtie>': uninitialized constant WillPaginate::Railtie::Forbidden (NameError)
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
from /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /root/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!'
from /home/bistipweb/config/environment.rb:5:in `<top (required)>'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `require'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `require'
from /home/bistipweb/config.ru:3:in `block in <main>'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in `instance_eval'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in `initialize'
from /home/bistipweb/config.ru:in `new'
from /home/bistipweb/config.ru:in `<main>'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.0/lib/rack/builder.rb:49:in `eval'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.0/lib/rack/builder.rb:49:in `new_from_string'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.0/lib/rack/builder.rb:40:in `parse_file'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.0/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.0/lib/rack/server.rb:208:in `app'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/server.rb:61:in `app'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.0/lib/rack/server.rb:336:in `wrapped_app'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/server.rb:78:in `start'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `server'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
My railtie.rb is:
require 'will_paginate'
require 'will_paginate/collection'
module WillPaginate
class Railtie < Rails::Railtie
initializer "will_paginate.active_record" do |app|
if defined? ::ActiveRecord
require 'will_paginate/finders/active_record'
WillPaginate::Finders::ActiveRecord.enable!
end
end
initializer "will_paginate.action_dispatch" do |app|
if defined?(ActionController::Base)
config.action_dispatch.rescue_responses.update('ActionController::Forbidden'=>Forbidden)
end
end
initializer "will_paginate.action_view" do |app|
require 'will_paginate/view_helpers/action_view'
ActionView::Base.send(:include, WillPaginate::ViewHelpers::ActionView)
end
end
end
How can I fix it?
You don't have to add any initializer codes for hooking will_paginate into Rails project, if you are using recent will_paginate versions.
I see you are using 3.0.pre2 version, update it to 3.0.7 in your Gemfile, bundle update will_paginate and remove all the codes you added in railtie.rb, I think everything would be ok.
Try:
initializer "will_paginate.action_dispatch" do |app|
if defined?(ActionController::Base)
config.action_dispatch.rescue_responses.update('ActionController::Forbidden'=>Forbidden)
end
end
I do not find any reason for you to add railtie.rb file. I believe just adding the gem and using it in your view should work.
My Ruby file
require 'puppet'
# ...
require 'googleauth'
module PuppetX
module Puppetlabs
module Google_cloud_dns
class Provider < PuppetX::Puppetlabs::Swagger::Provider
def client
self.class.client
end
My RSpec file
I am using this two alternatively, but none of them working:
require_relative'../../lib/puppet_x/puppetlabs/google_cloud_dns/provider'
File.expand_path("../../lib/puppet_x/puppetlabs/google_cloud_dns/provider.rb",File.dirname(__FILE__)))
require 'spec_helper'
require_relative '../../lib/puppet_x/puppetlabs/google_cloud_dns/provider'
File.expand_path("../../lib/puppet_x/puppetlabs/google_cloud_dns/provider.rb", File.dirname(__FILE__))
describe Provider do
it "checks function" do
provide = Provider.new
provide.should respond_to :client
end
end
The error which I am getting
rspec Mymodule/gc_dns/puppet-google_cloud_dns/spec/classes/provider_spec.rb --format documentation/home/vivekkumarmishra17/Mymodule/gc_dns/puppet-google_cloud_dns/spec/classes/provider_spec.rb:19:in `<top (required)>': uninitialized constant Provider (NameError)
from /var/lib/gems/1.9.1/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1361:in `load'
from /var/lib/gems/1.9.1/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1361:in `block in load_spec_files'
from /var/lib/gems/1.9.1/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1359:in `each'
from /var/lib/gems/1.9.1/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1359:in `load_spec_files'
from /var/lib/gems/1.9.1/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:106:in `setup'
from /var/lib/gems/1.9.1/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:92:in `run'
from /var/lib/gems/1.9.1/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:78:in `run'
from /var/lib/gems/1.9.1/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:45:in `invoke'
from /var/lib/gems/1.9.1/gems/rspec-core-3.4.4/exe/rspec:4:in `<top (required)>'
from /usr/local/bin/rspec:23:in `load'
from /usr/local/bin/rspec:23:in `<main>'
Can anyone tell what I am doing wrong?
I was trying to add my custom implementation for ActiveRecordss find_in_batches method. First, I tried to monkeypatch the corresponding module:
module ActiveRecord
module Batches
def find_in_batches2
end
end
end
Task.find_in_batches2 do |group|
end
But ruby said:
NoMethodError: undefined method `find_in_batches2' for Task (call 'Task.connection' to establish a connection):Class
/home/yuri/.gem/ruby/2.1.5/gems/activerecord-4.2.0/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
/srv/http/tm/Rakefile:15:in `<top (required)>'
/home/yuri/.gem/ruby/2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
/home/yuri/.gem/ruby/2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `block in load'
/home/yuri/.gem/ruby/2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/yuri/.gem/ruby/2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
/home/yuri/.gem/ruby/2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
/home/yuri/.gem/ruby/2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `block in load'
/home/yuri/.gem/ruby/2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/yuri/.gem/ruby/2.1.5/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
-e:1:in `<main>'
Then I tried following this answer, to no avail. What am I doing wrong and why is it so hard?
Here is the solution:
ActiveRecord::Batches.module_eval do
def find_in_batches2
end
end
ActiveRecord::Querying.module_eval do
delegate :find_in_batches2, :to => :all
end
Don't forget to implement find_in_batches2.
Before anything, I know 1.9.1 (1.9.1-p243 specifically) is old and broken, but we have an app with a pretty strict dependency on it.
First off, is there a list of rspec-supported rubies?
Secondly, when putting anything in a describe block in a spec, I get an error uninitialized constant BasicObject::Class (NameError).
With this spec:
require_relative 'rspec_basic_object_test'
describe RspecBasicObjectTest do
before :each do
#obj = RspecBasicObjectTest.new
end
it 'returns something' do
#obj.foo.should == "foo"
end
end
and this ruby file:
class RspecBasicObjectTest
attr_reader :foo
def initialize
#foo = "foo"
end
end
I get:
dlampa#ubuntu:~/code/mine$ rspec rspec_basic_object_test_spec.rb
/home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-mocks-2.14.6/lib/rspec/mocks/syntax.rb:74:in `block in enable_should': uninitialized constant BasicObject::Class (NameError)
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-mocks-2.14.6/lib/rspec/mocks/syntax.rb:28:in `class_eval'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-mocks-2.14.6/lib/rspec/mocks/syntax.rb:28:in `enable_should'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-mocks-2.14.6/lib/rspec/mocks/configuration.rb:34:in `syntax='
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-mocks-2.14.6/lib/rspec/mocks/configuration.rb:52:in `<module:Mocks>'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-mocks-2.14.6/lib/rspec/mocks/configuration.rb:2:in `<module:RSpec>'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-mocks-2.14.6/lib/rspec/mocks/configuration.rb:1:in `<top (required)>'
from /home/dlampa/.rvm/rubies/ruby-1.9.1-p243/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/dlampa/.rvm/rubies/ruby-1.9.1-p243/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-mocks-2.14.6/lib/rspec/mocks/framework.rb:34:in `<top (required)>'
from /home/dlampa/.rvm/rubies/ruby-1.9.1-p243/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/dlampa/.rvm/rubies/ruby-1.9.1-p243/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-mocks-2.14.6/lib/rspec/mocks.rb:1:in `<top (required)>'
from /home/dlampa/.rvm/rubies/ruby-1.9.1-p243/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/dlampa/.rvm/rubies/ruby-1.9.1-p243/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-core-2.14.8/lib/rspec/core/mocking/with_rspec.rb:1:in `<top (required)>'
from /home/dlampa/.rvm/rubies/ruby-1.9.1-p243/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/dlampa/.rvm/rubies/ruby-1.9.1-p243/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:388:in `mock_with'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:278:in `mock_framework'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:884:in `configure_mock_framework'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:280:in `ensure_example_groups_are_configured'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:295:in `set_it_up'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:245:in `subclass'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:232:in `describe'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-core-2.14.8/lib/rspec/core/dsl.rb:18:in `describe'
from /home/dlampa/code/mine/rspec_basic_object_test_spec.rb:3:in `<top (required)>'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:896:in `load'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:896:in `block in load_spec_files'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:896:in `each'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-core-2.14.8/lib/rspec/core/configuration.rb:896:in `load_spec_files'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:22:in `run'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:80:in `run'
from /home/dlampa/.rvm/gems/ruby-1.9.1-p243#rspec-test/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:17:in `block in autorun'
Anyone else run into this? Or am I just missing something obvious in rspec's README that says 1.9.1 is old and broken, why are you using it?
When I start guard and save a rspec request, I always get this error,
I referred to this tutorial, http://railscasts.com/episodes/275-how-i-test
uninitialized constant ActiveRecord::Base (NameError)
See below,
/home/think/.rvm/gems/ruby-1.9.3-p385/gems/audited-activerecord-3.0.0/lib/audited/adapters/active_record/audit.rb:16:in `<module:ActiveRecord>': uninitialized constant ActiveRecord::Base (NameError)
from /home/think/.rvm/gems/ruby-1.9.3-p385/gems/audited-activerecord-3.0.0/lib/audited/adapters/active_record/audit.rb:6:in `<module:Adapters>'
from /home/think/.rvm/gems/ruby-1.9.3-p385/gems/audited-activerecord-3.0.0/lib/audited/adapters/active_record/audit.rb:5:in `<module:Audited>'
from /home/think/.rvm/gems/ruby-1.9.3-p385/gems/audited-activerecord-3.0.0/lib/audited/adapters/active_record/audit.rb:4:in `<top (required)>'
from /home/think/.rvm/gems/ruby-1.9.3-p385/gems/audited-activerecord-3.0.0/lib/audited/adapters/active_record.rb:3:in `<top (required)>'
from /home/think/.rvm/gems/ruby-1.9.3-p385/gems/audited-activerecord-3.0.0/lib/audited-activerecord.rb:2:in `<top (required)>'
from /home/think/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require'
from /home/think/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /home/think/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `each'
from /home/think/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `block in require'
from /home/think/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `each'
from /home/think/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `require'
from /home/think/.rvm/gems/ruby-1.9.3-p385#global/gems/bundler-1.2.3/lib/bundler.rb:128:in `require'
from /home/think/jonathan/organizor/config/application.rb:7:in `<top (required)>'
from /home/think/jonathan/organizor/config/environment.rb:2:in `require'
from /home/think/jonathan/organizor/config/environment.rb:2:in `<top (required)>'
from /home/think/jonathan/organizor/spec/spec_helper.rb:3:in `require'
from /home/think/jonathan/organizor/spec/spec_helper.rb:3:in `<top (required)>'
from /home/think/jonathan/organizor/spec/requests/password_resets_spec.rb:1:in `require'
from /home/think/jonathan/organizor/spec/requests/password_resets_spec.rb:1:in `<top (required)>'
from /home/think/.rvm/gems/ruby-1.9.3-p385/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `load'
from /home/think/.rvm/gems/ruby-1.9.3-p385/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `block in load_spec_files'
from /home/think/.rvm/gems/ruby-1.9.3-p385/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `each'
from /home/think/.rvm/gems/ruby-1.9.3-p385/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `load_spec_files'
from /home/think/.rvm/gems/ruby-1.9.3-p385/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb:22:in `run'
from /home/think/.rvm/gems/ruby-1.9.3-p385/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb:80:in `run'
from /home/think/.rvm/gems/ruby-1.9.3-p385/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb:17:in `block in autorun'
I havent done rails testing. This is my first time. I certainly know that some config I have missed. Please help.
This is amazing, I had a empty file in lib directory called, "active_record.rb", this was being loaded instead of rails ActiveRecord. Hence, the uninitialized name error. Guys, be careful what you name your classes that you are going to keep under lib. It overrides.
Gosh, ate one day to figure this out.