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

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.

Related

I am trying to run a ruby sinatra app and I'm getting this error while running config.ru: cannot load such file -- matrix (LoadError)

This is the error I'm getting, please tell me what should I do?
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/prawn-2.4.0/lib/prawn/transformation_stack.rb:10:in `require': cannot load such file -- matrix (LoadError)
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/prawn-2.4.0/lib/prawn/transformation_stack.rb:10:in `<top (required)>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/prawn-2.4.0/lib/prawn.rb:67:in `require_relative'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/prawn-2.4.0/lib/prawn.rb:67:in `<top (required)>'
from C:/Users/Ayushman Bedi/diabetes_analyst-master/diabetes_analyst-master/config/environment.rb:12:in `require'
from C:/Users/Ayushman Bedi/diabetes_analyst-master/diabetes_analyst-master/config/environment.rb:12:in `<top (required)>'
from C:/Users/Ayushman Bedi/diabetes_analyst-master/diabetes_analyst-master/config.ru:2:in `require'
from C:/Users/Ayushman Bedi/diabetes_analyst-master/diabetes_analyst-master/config.ru:2:in `block in <main>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/builder.rb:116:in `eval'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/builder.rb:116:in `new_from_string'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/builder.rb:105:in `load_file'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/builder.rb:66:in `parse_file'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/server.rb:349:in `build_app_and_options_from_config'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/server.rb:249:in `app'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/server.rb:422:in `wrapped_app'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/server.rb:312:in `block in start'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/server.rb:379:in `handle_profiling'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/server.rb:311:in `start'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rack-2.2.4/lib/rack/server.rb:168:in `start'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rack-2.2.4/bin/rackup:5:in `<top (required)>'
from C:/Ruby31-x64/bin/rackup:25:in `load'
from C:/Ruby31-x64/bin/rackup:25:in `<main>'
I installed all the gems required, matrix, rack, prawn... but still.

Ruby Rake - Error

I am using vmware and trying to run rake db:migrate for getting the database tables. I am getting this error.
ubuntu#ubuntu-VirtualBox:~/hw-acceptance-unit-test-cycle/rottenpotatoes$ bundle exec rake db:migrate
rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'coffee-rails'.
Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
Backtrace for gem load error is:
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in ` autodetect'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
/var/lib/gems/2.3.0/gems/coffee-script-2.4.1/lib/coffee_script.rb:1:in `require'
/var/lib/gems/2.3.0/gems/coffee-script-2.4.1/lib/coffee_script.rb:1:in `<top (required)>'
/var/lib/gems/2.3.0/gems/coffee-script-2.4.1/lib/coffee-script.rb:1:in `require'
/var/lib/gems/2.3.0/gems/coffee-script-2.4.1/lib/coffee-script.rb:1:in `<top (required)>'
/var/lib/gems/2.3.0/gems/coffee-rails-4.1.1/lib/coffee-rails.rb:1:in `require'
/var/lib/gems/2.3.0/gems/coffee-rails-4.1.1/lib/coffee-rails.rb:1:in `<top (required)>'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `block in require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `each'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:106:in `require'
/home/ubuntu/hw-acceptance-unit-test-cycle/rottenpotatoes/config/application.rb:12:in `<top (required)>'
/home/ubuntu/hw-acceptance-unit-test-cycle/rottenpotatoes/Rakefile:5:in `require'
/home/ubuntu/hw-acceptance-unit-test-cycle/rottenpotatoes/Rakefile:5:in `<top (required)>'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:686:in `raw_load_rakefile'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:96:in `block in load_rakefile'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:95:in `load_rakefile'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:79:in `block in run'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling'
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:77:in `run'
/var/lib/gems/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
Bundler Error Backtrace:
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `block in require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `each'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:106:in `require'
/home/ubuntu/hw-acceptance-unit-test-cycle/rottenpotatoes/config/application.rb:12:in `<top (required)>'
/home/ubuntu/hw-acceptance-unit-test-cycle/rottenpotatoes/Rakefile:5:in `require'
/home/ubuntu/hw-acceptance-unit-test-cycle/rottenpotatoes/Rakefile:5:in `<top (required)>'
/var/lib/gems/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
/var/lib/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
/var/lib/gems/2.3.0/gems/coffee-script-2.4.1/lib/coffee_script.rb:1:in `require'
/var/lib/gems/2.3.0/gems/coffee-script-2.4.1/lib/coffee_script.rb:1:in `<top (required)>'
/var/lib/gems/2.3.0/gems/coffee-script-2.4.1/lib/coffee-script.rb:1:in `require'
/var/lib/gems/2.3.0/gems/coffee-script-2.4.1/lib/coffee-script.rb:1:in `<top (required)>'
/var/lib/gems/2.3.0/gems/coffee-rails-4.1.1/lib/coffee-rails.rb:1:in `require'
/var/lib/gems/2.3.0/gems/coffee-rails-4.1.1/lib/coffee-rails.rb:1:in `<top (required)>'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in block in require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:ineach'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in require'
/var/lib/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:106:inrequire'
/home/ubuntu/hw-acceptance-unit-test-cycle/rottenpotatoes/config/application.rb:12:in <top (required)>'
/home/ubuntu/hw-acceptance-unit-test-cycle/rottenpotatoes/Rakefile:5:inrequire'
/home/ubuntu/hw-acceptance-unit-test-cycle/rottenpotatoes/Rakefile:5:in <top (required)>'
/var/lib/gems/2.3.0/gems/rake-11.2.2/exe/rake:27:in'
(See full trace by running task with --trace)
What is the problem?
If you are on Linux then run:
sudo apt-get install nodejs
On Mac:
brew install node
and then run bundle and try to migrate. Must work.
Also you shall be more attentive to the search on Stackoverflow for not to duplicate same topics.
Rails - Could not find a JavaScript runtime?

Something wrong with active_record

I got this error when i ran the 'rackup' command after using rake for database migrations, i don't understand what this means.
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/railties/databases.rake:3:in `<top (required)>': undefined method `namespace' for main:Object (NoMethodError)
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `load'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `block in load'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `load'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sinatra-activerecord-2.0.6/lib/sinatra/activerecord/rake.rb:1:in `<top (required)>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `block in require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require'
from C:/wamp/www/sinatra-template-master/config.ru:2:in `block in <main>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from C:/wamp/www/sinatra-template-master/config.ru:in `new'
from C:/wamp/www/sinatra-template-master/config.ru:in `<main>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:272:in `start'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:147:in `start'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.6.4/bin/rackup:4:in `<top (required)>'
from C:/RailsInstaller/Ruby2.1.0/bin/rackup:23:in `load'
from C:/RailsInstaller/Ruby2.1.0/bin/rackup:23:in `<main>'
pls help, thanks!
i have this in my config.ru file
require './app'
require 'sinatra/activerecord/rake'
run Sinatra::Application
I tried to do the same config.ru. When i removed
require 'sinatra/activerecord/rake'
Everything started to work.
Method "namespace" is defined in rake/dsl_definition.rb. So, your application extending Sinatra::Base doesn't see it.

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?

MongoMapper: undefined method `each' for "StandardFormBuilder":String

I'm using MongoMapper with Padrino, and I'm having trouble with executing any padrino tasks. I get this error for nearly every tasks.
ethan#tardis:/var/www/sakura$ padrino rake -T
=> Executing Rake -T ...
/home/ethan/.rvm/gems/ruby-1.9.2-head/gems/mongo_mapper-0.8.6/lib/mongo_mapper/plugins/modifiers.rb:19:in `set': undefined method `each' for "StandardFormBuilder":String (NoMethodError)
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-helpers-0.9.29/lib/padrino-helpers.rb:33:in `registered'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/sinatra-1.2.6/lib/sinatra/base.rb:1200:in `block in register'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/sinatra-1.2.6/lib/sinatra/base.rb:1198:in `each'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/sinatra-1.2.6/lib/sinatra/base.rb:1198:in `register'
from /var/www/sakura/app/app.rb:3:in `<class:Sakura>'
from /var/www/sakura/app/app.rb:1:in `<top (required)>'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/reloader.rb:128:in `require'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/reloader.rb:128:in `safe_load'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/loader.rb:140:in `block in require_dependencies'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/loader.rb:138:in `each'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/loader.rb:138:in `require_dependencies'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/mounter.rb:125:in `locate_app_object'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/mounter.rb:21:in `initialize'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/mounter.rb:189:in `new'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/mounter.rb:189:in `mount'
from /var/www/sakura/config/apps.rb:34:in `<top (required)>'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/reloader.rb:128:in `require'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/reloader.rb:128:in `safe_load'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/loader.rb:140:in `block in require_dependencies'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/loader.rb:138:in `each'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/loader.rb:138:in `require_dependencies'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/loader.rb:56:in `block in load!'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/loader.rb:56:in `each'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/loader.rb:56:in `load!'
from /var/www/sakura/config/boot.rb:29:in `<top (required)>'
from /home/ethan/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /home/ethan/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/cli/base.rb:51:in `block in rake'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/cli/base.rb:130:in `capture'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/lib/padrino-core/cli/base.rb:51:in `rake'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/gems/padrino-core-0.9.29/bin/padrino:8:in `<top (required)>'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/bin/padrino:19:in `load'
from /home/ethan/.rvm/gems/ruby-1.9.2-head/bin/padrino:19:in `<main>'
I tried this with multiple Ruby versions, with similar results. Is this an error with Sinatra, MongoMapper, or what?
Seems a problem with ActiveSupport.
In your gemfile add:
gem "mongo_mapper", "~> 0.9.1"

Resources