NoMethodError: undefined method `validates_confirmation_of' Sinatra - ruby

Im getting the above error but dont understand why. Here is the stack trace:
/Users/benrumble/Desktop/Apple_tv_movies_and_stuff/skeletons/Full_Stack_Sinatra_App_Skeleton/Skeleton_App_with_user_login:sign_up_and_bcrypt/app/models/user.rb:8:in `<class:User>': undefined method `validates_confirmation_of' for User:Class (NoMethodError)
from /Users/benrumble/Desktop/Apple_tv_movies_and_stuff/skeletons/Full_Stack_Sinatra_App_Skeleton/Skeleton_App_with_user_login:sign_up_and_bcrypt/app/models/user.rb:4:in `<top (required)>'
from /Users/benrumble/Desktop/Apple_tv_movies_and_stuff/skeletons/Full_Stack_Sinatra_App_Skeleton/Skeleton_App_with_user_login:sign_up_and_bcrypt/app/data_mapper_setup.rb:6:in `require_relative'
from /Users/benrumble/Desktop/Apple_tv_movies_and_stuff/skeletons/Full_Stack_Sinatra_App_Skeleton/Skeleton_App_with_user_login:sign_up_and_bcrypt/app/data_mapper_setup.rb:6:in `<top (required)>'
from /Users/benrumble/Desktop/Apple_tv_movies_and_stuff/skeletons/Full_Stack_Sinatra_App_Skeleton/Skeleton_App_with_user_login:sign_up_and_bcrypt/app/app.rb:4:in `require_relative'
from /Users/benrumble/Desktop/Apple_tv_movies_and_stuff/skeletons/Full_Stack_Sinatra_App_Skeleton/Skeleton_App_with_user_login:sign_up_and_bcrypt/app/app.rb:4:in `<top (required)>'
from /Users/benrumble/Desktop/Apple_tv_movies_and_stuff/skeletons/Full_Stack_Sinatra_App_Skeleton/Skeleton_App_with_user_login:sign_up_and_bcrypt/spec/spec_helper.rb:3:in `require'
from /Users/benrumble/Desktop/Apple_tv_movies_and_stuff/skeletons/Full_Stack_Sinatra_App_Skeleton/Skeleton_App_with_user_login:sign_up_and_bcrypt/spec/spec_helper.rb:3:in `<top (required)>'
from /Users/benrumble/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.5.0/lib/rspec/core/configuration.rb:1394:in `require'
from /Users/benrumble/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.5.0/lib/rspec/core/configuration.rb:1394:in `block in requires='
from /Users/benrumble/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.5.0/lib/rspec/core/configuration.rb:1394:in `each'
from /Users/benrumble/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.5.0/lib/rspec/core/configuration.rb:1394:in `requires='
from /Users/benrumble/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.5.0/lib/rspec/core/configuration_options.rb:112:in `block in process_options_into'
from /Users/benrumble/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.5.0/lib/rspec/core/configuration_options.rb:111:in `each'
from /Users/benrumble/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.5.0/lib/rspec/core/configuration_options.rb:111:in `process_options_into'
from /Users/benrumble/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.5.0/lib/rspec/core/configuration_options.rb:21:in `configure'
from /Users/benrumble/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.5.0/lib/rspec/core/runner.rb:99:in `setup'
from /Users/benrumble/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.5.0/lib/rspec/core/runner.rb:86:in `run'
from /Users/benrumble/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.5.0/lib/rspec/core/runner.rb:71:in `run'
from /Users/benrumble/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.5.0/lib/rspec/core/runner.rb:45:in `invoke'
from /Users/benrumble/.rvm/gems/ruby-2.3.0/gems/rspec-core-3.5.0/exe/rspec:4:in `<top (required)>'
from /Users/benrumble/.rvm/gems/ruby-2.3.0/bin/rspec:23:in `load'
from /Users/benrumble/.rvm/gems/ruby-2.3.0/bin/rspec:23:in `<main>'
from /Users/benrumble/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
from /Users/benrumble/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
and here is the user.rb model
require 'bcrypt'
require 'dm-validations'
class User
attr_reader :password
attr_accessor :password_confirmation
validates_confirmation_of :password
include DataMapper::Resource
property :id, Serial
property :email, String
property :password_digest, String, length: 60
def password=(password)
#password = password
self.password_digest = BCrypt::Password.create(password)
end
end
I tried with and without 'dm-validations' but it doesnt make a difference.
Any help would be great.
Thanks

I solved this issue by moving the
include DataMapper::Resource
line as the first line after declaring the class.

Related

How to check whether a function exist in ruby and also with parameter

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?

How do I add a method to ActiveRecord::Batches?

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.

Ruby: Rspec 2.14.1 on ruby 1.9.1 compatibility

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?

Rspec, Capybara, Guard - uninitialized constant ActiveRecord::Base (NameError)

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.

uninitialized constant ActionDispatch (NameError) in Ruby

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.

Resources