As you see between the first and second savings in the spec file ~15s passed. After the first saving I got the error because of the typo, then suddenly after the second saving I started getting the uninitialized constant: Shoulda (NameError).
Since then I've been getting this error after every save. Before this issue everything worked fine.
Why is this happening?
16:15:03 - INFO - Running: spec/controllers/tasks_controller_spec.rb
Running via Spring preloader in process 91917
/Users/Silo/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load': /Users/Silo/Desktop/ruby_on_rails/faskyn/spec/controllers/tasks_controller_spec.rb:8: syntax error, unexpected '{', expecting ')' (SyntaxError)
let(:executed_task { create(:task, executor: user) }
^
/Users/Silo/Desktop/ruby_on_rails/faskyn/spec/controllers/tasks_controller_spec.rb:8: syntax error, unexpected '}', expecting keyword_end
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1361:in `block in load_spec_files'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1359:in `each'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1359:in `load_spec_files'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:106:in `setup'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:92:in `run'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:78:in `run'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:45:in `invoke'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/exe/rspec:4:in `<top (required)>'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/spring-commands-rspec-1.0.4/lib/spring/commands/rspec.rb:18:in `call'
from /Users/Silo/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/Silo/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
16:15:04 - ERROR - Failed: "spring rspec -f progress -r /Users/Silo/.rvm/gems/ruby-2.2.3/gems/guard-rspec-4.6.4/lib/guard/rspec_formatter.rb -f Guard::RSpecFormatter --failure-exit-code 2 spec/controllers/tasks_controller_spec.rb" (exit code: 1)
16:15:17 - INFO - Running: spec/controllers/tasks_controller_spec.rb
Running via Spring preloader in process 91930
/Users/Silo/Desktop/ruby_on_rails/faskyn/spec/rails_helper.rb:16:in `<top (required)>': uninitialized constant Shoulda (NameError)
from /Users/Silo/Desktop/ruby_on_rails/faskyn/spec/controllers/tasks_controller_spec.rb:1:in `<top (required)>'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1361:in `block in load_spec_files'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1359:in `each'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1359:in `load_spec_files'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:106:in `setup'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:92:in `run'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:78:in `run'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:45:in `invoke'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/exe/rspec:4:in `<top (required)>'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/spring-commands-rspec-1.0.4/lib/spring/commands/rspec.rb:18:in `call'
from /Users/Silo/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/Silo/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
16:15:20 - ERROR - Failed: "spring rspec -f progress -r /Users/Silo/.rvm/gems/ruby-2.2.3/gems/guard-rspec-4.6.4/lib/guard/rspec_formatter.rb -f Guard::RSpecFormatter --failure-exit-code 2 spec/controllers/tasks_controller_spec.rb" (exit code: 1)
16:15:43 - INFO - Running: spec/controllers/tasks_controller_spec.rb
Running via Spring preloader in process 91941
/Users/Silo/Desktop/ruby_on_rails/faskyn/spec/rails_helper.rb:16:in `<top (required)>': uninitialized constant Shoulda (NameError)
from /Users/Silo/Desktop/ruby_on_rails/faskyn/spec/controllers/tasks_controller_spec.rb:1:in `<top (required)>'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1361:in `block in load_spec_files'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1359:in `each'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1359:in `load_spec_files'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:106:in `setup'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:92:in `run'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:78:in `run'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:45:in `invoke'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/exe/rspec:4:in `<top (required)>'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/spring-commands-rspec-1.0.4/lib/spring/commands/rspec.rb:18:in `call'
from /Users/Silo/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/Silo/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
16:15:45 - ERROR - Failed: "spring rspec -f progress -r /Users/Silo/.rvm/gems/ruby-2.2.3/gems/guard-rspec-4.6.4/lib/guard/rspec_formatter.rb -f Guard::RSpecFormatter --failure-exit-code 2 spec/controllers/tasks_controller_spec.rb" (exit code: 1)
16:16:39 - INFO - Running: spec/models/conversation_spec.rb
Running via Spring preloader in process 91963
/Users/Silo/Desktop/ruby_on_rails/faskyn/spec/rails_helper.rb:16:in `<top (required)>': uninitialized constant Shoulda (NameError)
from /Users/Silo/Desktop/ruby_on_rails/faskyn/spec/models/conversation_spec.rb:1:in `<top (required)>'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1361:in `block in load_spec_files'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1359:in `each'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/configuration.rb:1359:in `load_spec_files'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:106:in `setup'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:92:in `run'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:78:in `run'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/lib/rspec/core/runner.rb:45:in `invoke'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.4/exe/rspec:4:in `<top (required)>'
from /Users/Silo/.rvm/gems/ruby-2.2.3/gems/spring-commands-rspec-1.0.4/lib/spring/commands/rspec.rb:18:in `call'
from /Users/Silo/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/Silo/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
16:16:41 - ERROR - Failed: "spring rspec -f progress -r /Users/Silo/.rvm/gems/ruby-2.2.3/gems/guard-rspec-4.6.4/lib/guard/rspec_formatter.rb -f Guard::RSpecFormatter --failure-exit-code 2 spec/models/conversation_spec.rb" (exit code: 1)
Related
This is the error message I get:
rails aborted!
LoadError: cannot load such file -- active_record/railties/databases.rake
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:69:in `load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:69:in `rescue in load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:52:in `load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `block in load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.3/lib/active_record/railtie.rb:49:in `block in <class:Railtie>'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/railtie.rb:246:in `instance_exec'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/railtie.rb:246:in `block in run_tasks_blocks'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/railtie.rb:255:in `each'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/railtie.rb:255:in `each_registered_block'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/railtie.rb:246:in `run_tasks_blocks'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/application.rb:514:in `block in run_tasks_blocks'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/engine/railties.rb:15:in `each'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/engine/railties.rb:15:in `each'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/application.rb:514:in `run_tasks_blocks'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/engine.rb:459:in `load_tasks'
/Users/Prodigy/code/PierceF/conqueredtime/Rakefile:6:in `<top (required)>'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `block in load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/commands/rake/rake_command.rb:22:in `block in perform'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/command.rb:48:in `invoke'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<top (required)>'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
/Users/Prodigy/code/PierceF/conqueredtime/bin/rails:9:in `<top (required)>'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `call'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/spring-2.1.0/lib/spring/client.rb:30:in `run'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/spring-2.1.0/bin/spring:49:in `<top (required)>'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `<top (required)>'
/Users/Prodigy/code/PierceF/conqueredtime/bin/spring:15:in `require'
/Users/Prodigy/code/PierceF/conqueredtime/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Caused by:
Bootsnap::LoadPathCache::FallbackScan:
(See full trace by running task with --trace)
I also tried bundle exec rails db:create db:migrate but that still had no effect.
Since I was having this error only with this rails project and not the others, I thought maybe I'll try starting a brand new rails project and copy-paste the code/files from the older project into this new one. That fixed the issue! I guess since this is a small app I was able to get away with it.
I've been following this installation guide for Redmine http://www.redmine.org/projects/redmine/wiki/RedmineInstall. Everything went smoothly until step 5 in which I have to run
bundle exec rake generate_secret_token
Then I got this error
rake aborted!
LoadError: dlopen(/Library/Ruby/Gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2/mysql2.bundle, 0x0009): dependent dylib 'libssl.1.0.0.dylib' not found for '/Library/Ruby/Gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2/mysql2.bundle' - /Library/Ruby/Gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2/mysql2.bundle
/Library/Ruby/Gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2.rb:31:in `require'
/Library/Ruby/Gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2.rb:31:in `<top (required)>'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:81:in `require'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:76:in `each'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:76:in `block in require'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:65:in `each'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:65:in `require'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler.rb:114:in `require'
/Users/dongphan/Desktop/redmine-3.4.11/config/application.rb:5:in `<top (required)>'
/Users/dongphan/Desktop/redmine-3.4.11/Rakefile:5:in `require'
/Users/dongphan/Desktop/redmine-3.4.11/Rakefile:5:in `<top (required)>'
/Library/Ruby/Gems/2.3.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:74:in `load'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:74:in `kernel_load'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:28:in `run'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/cli.rb:463:in `exec'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/cli.rb:27:in `dispatch'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/cli.rb:18:in `start'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/exe/bundle:30:in `block in <top (required)>'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.17.3/exe/bundle:22:in `<top (required)>'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
(See full trace by running task with --trace)
Seems like libssl.1.0.0.dylib is not found, what should I do to resolve this?
I want to run an rspec test on one file.
I have tried various methods such as
rspec path/to/spec/file.rb
rake spec SPEC=spec/controllers/sessions_controller_spec.rb
bundle exec rspec path/to/spec/file.rb
But all of them give me this error:
.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:146:in `to_app': missing run or map statement (RuntimeError)
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:160:in `block in generate_map'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:160:in `each'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:160:in `generate_map'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rack-2.0.3/lib/rack/builder.rb:145:in `to_app'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/capybara-2.16.1/lib/capybara/rails.rb:13:in `<top (required)>'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
from /home/jay/Sites/New Folder/pg/scheduler/spec/spec_helper.rb:19:in `<top (required)>'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/configuration.rb:1455:in `require'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/configuration.rb:1455:in `block in requires='
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/configuration.rb:1455:in `each'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/configuration.rb:1455:in `requires='
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/configuration_options.rb:112:in `block in process_options_into'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/configuration_options.rb:111:in `each'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/configuration_options.rb:111:in `process_options_into'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/configuration_options.rb:21:in `configure'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:99:in `setup'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:86:in `run'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:71:in `run'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:45:in `invoke'
from /home/jay/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/exe/rspec:4:in `<main>'
How do I run an rspec test on one file?
I tried :
ruby -I test test/unit/my_model_test.rb
and it worked for me let me know if it helped you
Off course I read this:
rspec testing throws Uninitialized constant Rails (NameError)
But I am sure that there is nothing wrong with my code.
Just because of the operation system! (Thread?)
Here is the error message when ran rspec:
/home/user/testapp/spec/spec_helper.rb:26:in `block in <top (required)>': uninitialized constant Rails (NameError)
from /home/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core.rb:98:in `configure'
from /home/user/testapp/spec/spec_helper.rb:22:in `<top (required)>'
from /home/user/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/user/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/configuration.rb:1394:in `block in requires='
from /home/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/configuration.rb:1394:in `each'
from /home/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/configuration.rb:1394:in `requires='
from /home/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/configuration_options.rb:112:in `block in process_options_into'
from /home/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/configuration_options.rb:111:in `each'
from /home/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/configuration_options.rb:111:in `process_options_into'
from /home/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/configuration_options.rb:21:in `configure'
from /home/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/runner.rb:99:in `setup'
from /home/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/runner.rb:86:in `run'
from /home/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/runner.rb:71:in `run'
from /home/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/lib/rspec/core/runner.rb:45:in `invoke'
from /home/user/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.5.4/exe/rspec:4:in `<top (required)>'
from /home/user/.rbenv/versions/2.3.1/bin/rspec:23:in `load'
from /home/user/.rbenv/versions/2.3.1/bin/rspec:23:in `<main>'
The L26 of the spec_helper file is:
Rails.application.env_config['action_dispatch.show_detailed_exceptions'] = false
I am getting the error message below after running bin/rake in my terminal.
Does anyone know what's going on and how to fix it?
My terminal error output is as follows:
treehouse:~/projects/odot (master *) $ bin/rake
/home/treehouse/.rbenv/versions/2.0.0-p353/bin/ruby -I/home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.4/lib:/home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-support-3.0.4/lib -S /home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.4/exe/rspec ./spec/controllers/todo_items_controller_spec.rb ./spec/controllers/todo_lists_controller_spec.rb ./spec/controllers/users_controller_spec.rb ./spec/features/todo_items/complete_spec.rb ./spec/features/todo_items/create_spec.rb ./spec/features/todo_items/delete_spec.rb ./spec/features/todo_items/edit_spec.rb ./spec/features/todo_items/index_spec.rb ./spec/features/todo_lists/create_spec.rb ./spec/features/todo_lists/destroy_spec.rb ./spec/features/todo_lists/edit_spec.rb ./spec/helpers/todo_items_helper_spec.rb ./spec/helpers/todo_lists_helper_spec.rb ./spec/helpers/users_helper_spec.rb ./spec/models/todo_item_spec.rb ./spec/models/todo_list_spec.rb ./spec/models/user_spec.rb ./spec/requests/todo_lists_spec.rb ./spec/routing/todo_lists_routing_spec.rb ./spec/routing/users_routing_spec.rb ./spec/views/todo_items/index.html.erb_spec.rb ./spec/views/todo_lists/edit.html.erb_spec.rb ./spec/views/todo_lists/index.html.erb_spec.rb ./spec/views/todo_lists/new.html.erb_spec.rb ./spec/views/todo_lists/show.html.erb_spec.rb ./spec/views/users/edit.html.erb_spec.rb ./spec/views/users/new.html.erb_spec.rb ./spec/views/users/show.html.erb_spec.rb
/home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require': cannot load such file -- rails_helper (LoadError)
from /home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `block in require'
from /home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require'
from /home/treehouse/projects/odot/spec/controllers/users_controller_spec.rb:1:in `<top (required)>'
from /home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:223:in `load'
from /home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:223:in `block in load'
from /home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:223:in `load'
from /home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in `block in load_spec_files'
from /home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in `each'
from /home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in `load_spec_files'
from /home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:97:in `setup'
from /home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:85:in `run'
from /home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:70:in `run'
from /home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:38:in `invoke'
from /home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.4/exe/rspec:4:in `<main>'
/home/treehouse/.rbenv/versions/2.0.0-p353/bin/ruby -I/home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.4/lib:/home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-support-3.0.4/lib -S /home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.4/exe/rspec ./spec/controllers/todo_items_controller_spec.rb ./spec/controllers/todo_lists_controller_spec.rb ./spec/controllers/users_controller_spec.rb ./spec/features/todo_items/complete_spec.rb ./spec/features/todo_items/create_spec.rb ./spec/features/todo_items/delete_spec.rb ./spec/features/todo_items/edit_spec.rb ./spec/features/todo_items/index_spec.rb ./spec/features/todo_lists/create_spec.rb ./spec/features/todo_lists/destroy_spec.rb ./spec/features/todo_lists/edit_spec.rb ./spec/helpers/todo_items_helper_spec.rb ./spec/helpers/todo_lists_helper_spec.rb ./spec/helpers/users_helper_spec.rb ./spec/models/todo_item_spec.rb ./spec/models/todo_list_spec.rb ./spec/models/user_spec.rb ./spec/requests/todo_lists_spec.rb ./spec/routing/todo_lists_routing_spec.rb ./spec/routing/users_routing_spec.rb ./spec/views/todo_items/index.html.erb_spec.rb ./spec/views/todo_lists/edit.html.erb_spec.rb ./spec/views/todo_lists/index.html.erb_spec.rb ./spec/views/todo_lists/new.html.erb_spec.rb ./spec/views/todo_lists/show.html.erb_spec.rb ./spec/views/users/edit.html.erb_spec.rb ./spec/views/users/new.html.erb_spec.rb ./spec/views/users/show.html.erb_spec.rb failed
treehouse:~/projects/odot (master *) $
It says /home/treehouse/projects/odot/spec/controllers/users_controller_spec.rb is failing to load rails_helper.rb.