Cucumber not working when running rake cucumber - ruby-on-rails

I have no features in a test app that I downloaded. I have written no code yet. I ran rake cucumber to test if it is working correctly or not and it gave me the following errors.
/home/user/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.18/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now
/home/user/.rvm/rubies/ruby-2.2.1/bin/ruby -S bundle exec cucumber --profile default
/home/user/.rvm/gems/ruby-2.2.1/gems/cucumber-1.3.15/lib/cucumber/ast/step.rb:80: warning: circular argument reference - name
/home/user/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.18/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now
cannot load such file -- test/unit (LoadError)
/home/user/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in `require'
/home/user/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in `block in require'
/home/user/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/user/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in `require'
/home/user/.rvm/gems/ruby-2.2.1/gems/railties-3.2.18/lib/rails/test_help.rb:5:in `<top (required)>'
/home/user/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in `require'
/home/user/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in `block in require'
/home/user/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/user/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in `require'
/home/user/.rvm/gems/ruby-2.2.1/gems/cucumber-rails-1.4.1/lib/cucumber/rails.rb:11:in `<top (required)>'
/home/user/SE/bdd-tdd-cycle/rottenpotatoes/features/support/env.rb:7:in `require'
/home/user/SE/bdd-tdd-cycle/rottenpotatoes/features/support/env.rb:7:in `<top (required)>'
/home/user/.rvm/gems/ruby-2.2.1/gems/cucumber-1.3.15/lib/cucumber/rb_support/rb_language.rb:95:in `load'
/home/user/.rvm/gems/ruby-2.2.1/gems/cucumber-1.3.15/lib/cucumber/rb_support/rb_language.rb:95:in `load_code_file'
/home/user/.rvm/gems/ruby-2.2.1/gems/cucumber-1.3.15/lib/cucumber/runtime/support_code.rb:180:in `load_file'
/home/user/.rvm/gems/ruby-2.2.1/gems/cucumber-1.3.15/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/home/user/.rvm/gems/ruby-2.2.1/gems/cucumber-1.3.15/lib/cucumber/runtime/support_code.rb:82:in `each'
/home/user/.rvm/gems/ruby-2.2.1/gems/cucumber-1.3.15/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/home/user/.rvm/gems/ruby-2.2.1/gems/cucumber-1.3.15/lib/cucumber/runtime.rb:184:in `load_step_definitions'
/home/user/.rvm/gems/ruby-2.2.1/gems/cucumber-1.3.15/lib/cucumber/runtime.rb:42:in `run!'
/home/user/.rvm/gems/ruby-2.2.1/gems/cucumber-1.3.15/lib/cucumber/cli/main.rb:47:in `execute!'
/home/user/.rvm/gems/ruby-2.2.1/gems/cucumber-1.3.15/bin/cucumber:13:in `<top (required)>'
/home/user/.rvm/gems/ruby-2.2.1/bin/cucumber:23:in `load'
/home/user/.rvm/gems/ruby-2.2.1/bin/cucumber:23:in `<main>'
/home/user/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
/home/user/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'
Could someone tell me what's going on?
And what is the solution to this problem? It should ideally output that there are no tests available and the 0/0 steps passed.

Related

CircleCI builds fail on rake db:create

I have a project that I cannot get to build on CircleCI. All tests pass locally. If the build fails, and I rerun the build with ssh, I can connect and run all of the commands successfully, and all tests pass in the ssh session.
The build is failing at bundle exec rake db:create
I've tried rearranging my require statements in config/application.rb to no avail. Any ideas?
Here is the full backtrace:
bundle exec rake db:create --trace
rake aborted!
/usr/local/lib/ruby/2.4.0/uri.rb:99: warning: already initialized constant URI::VERSION_CODE
/usr/local/lib/ruby/2.4.0/uri.rb:99: warning: previous definition of VERSION_CODE was here
/usr/local/lib/ruby/2.4.0/uri.rb:100: warning: already initialized constant URI::VERSION
/usr/local/lib/ruby/2.4.0/uri.rb:100: warning: previous definition of VERSION was here
NameError: uninitialized constant URI::Generic
Did you mean? URI::Generic
/usr/local/lib/ruby/2.4.0/uri/ftp.rb:23:in `<module:URI>'
/usr/local/lib/ruby/2.4.0/uri/ftp.rb:13:in `<top (required)>'
/usr/local/lib/ruby/2.4.0/uri.rb:107:in `require'
/usr/local/lib/ruby/2.4.0/uri.rb:107:in `<top (required)>'
/usr/local/lib/ruby/2.4.0/uri/rfc2396_parser.rb:13:in `require'
/usr/local/lib/ruby/2.4.0/uri/rfc2396_parser.rb:13:in `<top (required)>'
/usr/local/lib/ruby/2.4.0/uri/common.rb:13:in `require'
/usr/local/lib/ruby/2.4.0/uri/common.rb:13:in `<top (required)>'
/usr/local/lib/ruby/2.4.0/uri/generic.rb:12:in `require'
/usr/local/lib/ruby/2.4.0/uri/generic.rb:12:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/gems/activesupport-5.2.4.1/lib/active_support/core_ext/object/json.rb:6:in `require'
/usr/local/bundle/ruby/2.4.0/gems/activesupport-5.2.4.1/lib/active_support/core_ext/object/json.rb:6:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/gems/activesupport-5.2.4.1/lib/active_support/core_ext/object.rb:13:in `require'
/usr/local/bundle/ruby/2.4.0/gems/activesupport-5.2.4.1/lib/active_support/core_ext/object.rb:13:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails/configuration.rb:4:in `require'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails/configuration.rb:4:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails/railtie/configuration.rb:3:in `require'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails/railtie/configuration.rb:3:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails/railtie.rb:223:in `require'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails/railtie.rb:223:in `config'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails/railtie.rb:127:in `config'
/usr/local/bundle/ruby/2.4.0/gems/activesupport-5.2.4.1/lib/active_support/i18n_railtie.rb:11:in `<class:Railtie>'
/usr/local/bundle/ruby/2.4.0/gems/activesupport-5.2.4.1/lib/active_support/i18n_railtie.rb:10:in `<module:I18n>'
/usr/local/bundle/ruby/2.4.0/gems/activesupport-5.2.4.1/lib/active_support/i18n_railtie.rb:9:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/gems/activesupport-5.2.4.1/lib/active_support/railtie.rb:4:in `require'
/usr/local/bundle/ruby/2.4.0/gems/activesupport-5.2.4.1/lib/active_support/railtie.rb:4:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails.rb:17:in `require'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails.rb:17:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails/all.rb:3:in `require'
/usr/local/bundle/ruby/2.4.0/gems/railties-5.2.4.1/lib/rails/all.rb:3:in `<top (required)>'
/home/circleci/vce/config/application.rb:7:in `require'
/home/circleci/vce/config/application.rb:7:in `<top (required)>'
/home/circleci/vce/Rakefile:4:in `require'
/home/circleci/vce/Rakefile:4:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/lib/rake/rake_module.rb:28:in `load'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/lib/rake/rake_module.rb:28:in `load_rakefile'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/lib/rake/application.rb:689:in `raw_load_rakefile'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/lib/rake/application.rb:94:in `block in load_rakefile'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/lib/rake/application.rb:93:in `load_rakefile'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/lib/rake/application.rb:77:in `block in run'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
/usr/local/bundle/ruby/2.4.0/gems/rake-10.5.0/bin/rake:33:in `<top (required)>'
/usr/local/bundle/ruby/2.4.0/bin/rake:23:in `load'
/usr/local/bundle/ruby/2.4.0/bin/rake:23:in `<top (required)>'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
/usr/local/bundle/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/usr/local/bundle/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
/usr/local/bundle/bin/bundle:113:in `load'
/usr/local/bundle/bin/bundle:113:in `<main>'
Exited with code exit status 1
CircleCI received exit code 1```
This may not be a full answer, but I had a similar issue when using the circleci/ruby:2.4.2-jessie-node image. I didn't dig in very much, but on the surface there seems to be an issue with loading the URI::Generic class.
Since this error came from core ruby itself I chalked it up to that image, and updated the image to circleci/ruby:2.4.3-jessie-node and didn't run into the same error.
Which I had more info, but haven't had a chance for a deeper dive:
TL;DR
In the file .circleci/config.yml update:
docker:
- image: circleci/ruby:2.4.2-jessie-node
to
docker:
- image: circleci/ruby:2.4.3-jessie-node

Cannot Open Rails console without getting circular argument warning

Whenever I type in rails console into terminal (I'm in the root of my program), I get this:
/Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now
/Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- test/unit/testcase (LoadError)
from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/test_case.rb:1:in `<top (required)>'
from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/railties-3.2.13/lib/rails/console/app.rb:2:in `<top (required)>'
from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/railties-3.2.13/lib/rails/application.rb:304:in `initialize_console'
from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/railties-3.2.13/lib/rails/application.rb:152:in `load_console'
from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/railties-3.2.13/lib/rails/commands/console.rb:27:in `start'
from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/railties-3.2.13/lib/rails/commands/console.rb:8:in `start'
from /Users/TURNIPZ/.rvm/gems/ruby-2.2.1/gems/railties-3.2.13/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
How do I get rid of this and be able to use rails console? I think it has something to do with this https://teamtreehouse.com/forum/rails-console-not-fully-loading. I'm a complete beginner, so I'll probably need a step by step guide to fixing the problem. How do I add
gem 'test unit'
to my gemfile.

Rails - ruby/2.1.0/minitest/parallel_each.rb:67:in '<class:Unit>': undefined method '_run_suites' for class 'Minitest::Unit' (NameError)

I cloned this repository: https://github.com/railstutorial/sample_app_rails_4
I followed the instructions to setup the project in my local machine:
cd /tmp
git clone https://github.com/railstutorial/sample_app_rails_4.git
cd sample_app_rails_4
cp config/database.yml.example config/database.yml
bundle install --without production
bundle exec rake db:migrate
bundle exec rake db:test:prepare
bundle exec rspec spec/
but when I run "bundle exec rspec spec" for testing I got this output:
No DRb server is running. Running in local process instead ...
/usr/lib/ruby/2.1.0/minitest/parallel_each.rb:67:in `<class:Unit>': undefined method `_run_suites' for class `Minitest::Unit' (NameError)
from /usr/lib/ruby/2.1.0/minitest/parallel_each.rb:66:in `<top (required)>'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in require'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/testing/isolation.rb:2:in `<top (required)>'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in require'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/test_case.rb:9:in `<top (required)>'
from /var/lib/gems/2.1.0/gems/actionpack-4.0.8/lib/action_controller/test_case.rb:405:in `<module:ActionController>'
from /var/lib/gems/2.1.0/gems/actionpack-4.0.8/lib/action_controller/test_case.rb:6:in `<top (required)>'
from /var/lib/gems/2.1.0/gems/rspec-rails-2.13.1/lib/rspec/rails/example/controller_example_group.rb:9:in `<module:ControllerExampleGroup>'
from /var/lib/gems/2.1.0/gems/rspec-rails-2.13.1/lib/rspec/rails/example/controller_example_group.rb:6:in `<module:Rails>'
from /var/lib/gems/2.1.0/gems/rspec-rails-2.13.1/lib/rspec/rails/example/controller_example_group.rb:5:in `<top (required)>'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in require'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
from /var/lib/gems/2.1.0/gems/rspec-rails-2.13.1/lib/rspec/rails/example.rb:2:in `<top (required)>'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in require'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
from /var/lib/gems/2.1.0/gems/rspec-rails-2.13.1/lib/rspec/rails.rb:16:in `<top (required)>'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in require'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
from /var/lib/gems/2.1.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
from /home/dyego/Documents/coisas/rails/sample_app_rails_4/spec/spec_helper.rb:7:in `block in <top (required)>'
from /var/lib/gems/2.1.0/gems/spork-1.0.0rc4/lib/spork.rb:24:in `prefork'
from /home/dyego/Documents/coisas/rails/sample_app_rails_4/spec/spec_helper.rb:4:in `<top (required)>'
from /home/dyego/Documents/coisas/rails/sample_app_rails_4/spec/controllers/relationships_controller_spec.rb:1:in `require'
from /home/dyego/Documents/coisas/rails/sample_app_rails_4/spec/controllers/relationships_controller_spec.rb:1:in `<top (required)>'
from /var/lib/gems/2.1.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load'
from /var/lib/gems/2.1.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `block in load_spec_files'
from /var/lib/gems/2.1.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `each'
from /var/lib/gems/2.1.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load_spec_files'
from /var/lib/gems/2.1.0/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in `run'
from /var/lib/gems/2.1.0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:77:in `rescue in run'
from /var/lib/gems/2.1.0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:73:in `run'
from /var/lib/gems/2.1.0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `block in autorun'
My computer: Ubuntu(14.04)
My rails version is: 4.0.8
My ruby version is: ruby 2.1.3p242 (2014-09-19 revision 45877) [x86_64-linux-gnu]
I couldn't find much help on google, and I'm really struggling to solve this problem
A useful information, when I use nitrous.io and setup the project there everything works just fine, maybe something is wrong with my computer?

Rails generate command error?

I am trying to use the Rails generate command on an existing Rails website to make a new controller.
I checked out the repository to my local system but when I try to run the generate command I get the following error:
C:/Ruby/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:
2:in `require': 126: The specified module could not be found. - C:/Ruby/lib/ru
by/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/1.9/mysql2.so (LoadError
)
from C:/Ruby/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysq
l2/mysql2.rb:2:in `<top (required)>'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysq
l2.rb:9:in `require'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysq
l2.rb:9:in `<top (required)>'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.
rb:76:in `require'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.
rb:76:in `block (2 levels) in require'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.
rb:72:in `each'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.
rb:72:in `block in require'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.
rb:61:in `each'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.
rb:61:in `require'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler.rb:132:i
n `require'
from C:/Users/dboliver/Desktop/Assorted Items/RB_OLTARIS/branch/rails_3_
dev/config/application.rb:15:in `<top (required)>'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/commands
.rb:24:in `require'
from C:/Ruby/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/commands
.rb:24:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Make sure MySQL is running, you can run
mysql.server start
command to confirm
and then, run
bundle install
to verify MySQL gem is installed too

Error occurring using guard in rails 3.1.1

Hey guys I'm following the rails tutorial found here http://net.tutsplus.com/tutorials/ruby/the-intro-to-rails-screencast-i-wish-i-had/ and I've gotten to the point where you use guard to execute unit tests. I keep getting the error found below when using guard, I tried installing the activesupport gem but it still seems to fail. If anyone has any tips on how to fix this I would appreciate it thanks :)
I'm also running 64 bit Ubuntu
chuck#chuck-laptop:~/rails/tasks$ bundle exec guard
Guard could not detect any of the supported notification libraries.
Guard is now watching at '/home/chuck/rails/tasks'
Guard::RSpec is running, with RSpec 2!
Running all specs
/home/chuck/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/test/unit/assertions.rb:5:in `<module:Test>': Unit is not a module (TypeError)
from /home/chuck/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/test/unit/assertions.rb:4:in `<top (required)>'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-rails-2.8.1/lib/rspec/rails/adapters.rb:2:in `<top (required)>'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-rails-2.8.1/lib/rspec/rails.rb:10:in `<top (required)>'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /home/chuck/rails/tasks/spec/spec_helper.rb:4:in `<top (required)>'
from /home/chuck/rails/tasks/spec/requests/tasks_spec.rb:1:in `require'
from /home/chuck/rails/tasks/spec/requests/tasks_spec.rb:1:in `<top (required)>'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `load'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `block in load_spec_files'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `map'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `load_spec_files'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:22:in `run'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:80:in `run_in_process'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:69:in `run'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:10:in `block in autorun'
Guard::RSpec is running, with RSpec 2!
Running all specs
/home/chuck/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/test/unit/assertions.rb:5:in `<module:Test>': Unit is not a module (TypeError)
from /home/chuck/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/test/unit/assertions.rb:4:in `<top (required)>'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-rails-2.8.1/lib/rspec/rails/adapters.rb:2:in `<top (required)>'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-rails-2.8.1/lib/rspec/rails.rb:10:in `<top (required)>'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /home/chuck/rails/tasks/spec/spec_helper.rb:4:in `<top (required)>'
from /home/chuck/rails/tasks/spec/requests/tasks_spec.rb:1:in `require'
from /home/chuck/rails/tasks/spec/requests/tasks_spec.rb:1:in `<top (required)>'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `load'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `block in load_spec_files'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `map'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:698:in `load_spec_files'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:22:in `run'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:80:in `run_in_process'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:69:in `run'
from /home/chuck/.rvm/gems/ruby-1.9.2-p290/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:10:in `block in autorun'
Bye bye...
WORKAROUND:
Remove turn gem from Gemfile.
gem uninstall turn
I copypasted the workaround from here
BTW, I don't want to go too offtopic, but if you solve this issue and follow the tutorial, let me give you an advice:
If you get stuck on
Failure/Error: #task = Task.create :task => 'go to bed'
ActiveRecord::StatementInvalid:
Could not find table 'tasks'
Then run this command:
rake
The problem is, instead of that one, they tell you to run:
rake db:migrate
Which is fine, but does not migrate the test database.
Cheers!
As part of the tutorial you are following the narrator uses "gem 'turn' " in the gem file. After reading some other blogs I deleted that one gem (all it does is cause pretty test output) and re-bundled. Guard finally became functional. I still had another error, but it would tell me how many tests passed and failed, and which were which. Hope this helps.

Resources