/home/si/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- debugger (LoadError)
from /home/si/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/si/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1327:in `load'
from /home/si/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1327:in `block in load_spec_files'
from /home/si/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1325:in `each'
from /home/si/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1325:in `load_spec_files'
from /home/si/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:102:in `setup'
from /home/si/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:88:in `run'
from /home/si/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:73:in `run'
from /home/si/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:41:in `invoke'
from /home/si/.rvm/gems/ruby-2.2.1/gems/rspec-core-3.3.2/exe/rspec:4:in `<top (required)>'
from /home/si/.rvm/gems/ruby-2.2.1/bin/rspec:23:in `load'
from /home/si/.rvm/gems/ruby-2.2.1/bin/rspec:23:in `<main>'
from /home/si/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
from /home/si/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'
I type rspec from the folder where lib and spec are present to get this error. I tried searching other links to no avail. Basically, I need to run autotest but it shows the "require could not load file" error.
What is the solution?
Thanks a lot in advance.
Related
While trying to install rails I get this error. I also was not able to install sqlite3 so I simply tried: gem install sqlite3 -- And it seemed that it worked.
Error:
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/compile_cache/iseq.rb:60:in `fetch': No such file or directory - bs_fetch:
open_current_file:fstat (Errno::ENOENT)
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/compile_cache/iseq.rb:60:in `fetch'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/compile_cache/iseq.rb:85:in `load_iseq'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from C:/Ruby31-x64/lib/ruby/3.1.0/yaml.rb:4:in `<main>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/compile_cache/yaml.rb:58:in `init!'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/compile_cache/yaml.rb:38:in `install!'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/compile_cache.rb:26:in `setup'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap.rb:71:in `setup'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap.rb:112:in `default_setup'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.10.3/lib/bootsnap/setup.rb:5:in `<top (required)>'
from C:/Users/cctv0/Desktop/ruby-projects/friends/friends/config/boot.rb:4:in `require'
from C:/Users/cctv0/Desktop/ruby-projects/friends/friends/config/boot.rb:4:in `<top (required)>'
from bin/rails:3:in `require_relative'
from bin/rails:3:in `<main>'
I had the same error, I solved it by changing the project path C:\rails\my-first-app
I've started on creating multi vendor permissions for Solidus.
I used one of the other permission_sets as a starting point, but I'm missing one crucial thing.
As you can see, my test fails:
$ bundle exec rspec spec/models/spree/permission_sets/multi_vendor_spec.rb
multi_vendor_spec.rb:3:in `<top (required)>':
uninitialized constant Spree::PermissionSets::MultiVendor (NameError)
from gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1327:in `load'
from gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1327:in `block in load_spec_files'
from gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1325:in `each'
from gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1325:in `load_spec_files'
from gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:102:in `setup'
from gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:88:in `run'
from gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:73:in `run'
from gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:41:in `invoke'
from gems/rspec-core-3.3.2/exe/rspec:4:in `<top (required)>'
from bin/rspec:23:in `load'
from bin/rspec:23:in `<main>'
from bin/ruby_executable_hooks:15:in `eval'
from bin/ruby_executable_hooks:15:in `<main>'
Can you see why Spree::PermissionSets::MultiVendor is reported uninitialized?
Cheers,
Martin
The fix is to add
require 'spree/permission_sets/multi_vendor' to spree/permission_sets.rb
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.
Hi i have just started making an app on ruby on rails and i have problems writing my spec files.
i ran bundle exec rspec spec/controllers/api/user_controller_spec.rb but it gave me the error:
/home/action/.gem/ruby/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load': cannot load such file -- /home/action
/slidey/spec/controllers/api/user_controller_spec.rb (LoadError)
from /home/action/.gem/ruby/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `block in load_spec_files'
from /home/action/.gem/ruby/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `each'
from /home/action/.gem/ruby/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load_spec_files'
from /home/action/.gem/ruby/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in `run'
from /home/action/.gem/ruby/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in `run'
from /home/action/.gem/ruby/2.0.0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `block in autorun'
EDIT: when i ran bundle exec rspec spec they gave me the following error:
/home/action/.gem/ruby/2.0.0/gems/activerecord-4.0.8/lib/active_record/dynamic_matchers.rb:22:in `method_missing': undefined method `has
_attached_file' for #<Class:0x007f44f503bee8> (NoMethodError)
from /home/action/slidey/app/models/documents.rb:6:in `<class:Documents>'
from /home/action/slidey/app/models/documents.rb:1:in `<top (required)>'
from /home/action/.gem/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
from /home/action/.gem/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in require'
from /home/action/.gem/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/action/.gem/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
from /home/action/.gem/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:330:in `require_or_load'
from /home/action/.gem/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:463:in `load_missing_constant'
from /home/action/.gem/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:184:in `const_missing'
from /home/action/slidey/spec/models/documents_spec.rb:3:in `<top (required)>'
from /home/action/.gem/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:223:in `load'
from /home/action/.gem/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:223:in `block in load'
from /home/action/.gem/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/action/.gem/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:223:in `load'
can anyone shed some light on this? what does it mean?
It looks like it cannot find the file spec/controllers/api/user_controller_spec.rb
Try to rename your spec file into users_controller_spec.rb
I am using:
Ubuntu 12.10
Rails 3.2.12
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
rake rake-10.0.4
When I run rake db:create I get this error message:
rake aborted!
cannot load such file -- spec
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
/home/lcastano/dev/roommateflatfinder/config/application.rb:7:in `<top (required)>'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/home/lcastano/dev/roommateflatfinder/Rakefile:5:in `<top (required)>'
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load'
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:589:in `raw_load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:89:in `block in load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:72:in `block in run'
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/var/lib/gems/1.9.1/gems/rake-10.0.4/bin/rake:33:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
I tried uninstalling rake and re-installing it. Anyone else have the same problem?
Problem
You have an invalid statement in your Rakefile or Gemfile. You probably meant 'rspec' or 'rspec-rails' instead. Rake itself is telling you so:
cannot load such file -- spec
Solution
Remove the reference to "spec" in your Rakefile or Gemfile, or replace the problematic line with the correct name of the gem or library you're trying to use.