I have updated to macOS ventura, there was some issue with ES(v7.17.4) so I uninstalled it and now when I'm trying to re-install the same, running into below error.
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification_policy.rb:4:in '<top (required)>': superclass mismatch for class SpecificationPolicy (TypeError)
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in 'require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in 'require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:16:in '<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:1365:in '<module:Gem>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:116:in '<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in 'require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in 'require'
from /usr/local/Homebrew/Library/Homebrew/utils/gems.rb:47:in 'setup_gem_environment!'
from /usr/local/Homebrew/Library/Homebrew/standalone/load_path.rb:13:in '<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/startup.rb:6:in 'require_relative'
from /usr/local/Homebrew/Library/Homebrew/startup.rb:6:in '<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/global.rb:4:in 'require_relative'
from /usr/local/Homebrew/Library/Homebrew/global.rb:4:in '<top (required)>'
from /usr/local/Homebrew/Library/Homebrew/build.rb:11:in 'require_relative'
from /usr/local/Homebrew/Library/Homebrew/build.rb:11:in '<main>'
Error: Failure while executing; `/usr/bin/sandbox-exec -f /private/tmp/homebrew20221031-58137-1t7tz3a.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -W1 -- /usr/local/Homebrew/Library/Homebrew/build.rb /usr/local/Homebrew/Library/Taps/elastic/homebrew-tap/Formula/elasticsearch-full.rb --debug` exited with 1.
/usr/local/Homebrew/Library/Homebrew/sandbox.rb:157:in 'exec'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:917:in 'block in build'
/usr/local/Homebrew/Library/Homebrew/utils/fork.rb:45:in 'block (3 levels) in safe_fork'
/usr/local/Homebrew/Library/Homebrew/utils/fork.rb:37:in 'fork'
/usr/local/Homebrew/Library/Homebrew/utils/fork.rb:37:in 'block (2 levels) in safe_fork'
/usr/local/Homebrew/Library/Homebrew/utils/fork.rb:34:in 'open'
/usr/local/Homebrew/Library/Homebrew/utils/fork.rb:34:in 'block in safe_fork'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in 'mktmpdir'
/usr/local/Homebrew/Library/Homebrew/utils/fork.rb:33:in 'safe_fork'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:905:in 'build'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:450:in 'install'
/usr/local/Homebrew/Library/Homebrew/upgrade.rb:203:in 'install_formula'
/usr/local/Homebrew/Library/Homebrew/install.rb:350:in 'install_formula'
/usr/local/Homebrew/Library/Homebrew/install.rb:340:in 'block in install_formulae'
/usr/local/Homebrew/Library/Homebrew/install.rb:339:in 'each'
/usr/local/Homebrew/Library/Homebrew/install.rb:339:in 'install_formulae'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:233:in 'install'
/usr/local/Homebrew/Library/Homebrew/brew.rb:95:in '<main>'
Tried couple of solutions, found here and there on the Internet.
See my answer at superclass mismatch for class SpecificationPolicy, what I did to help me overcome what looks like the same error
Related
bundle exec rake db:migrate
rake aborted!
LoadError: libffi.so.8: cannot open shared object file: No such file or directory - /usr/share/rvm/gems/ruby-2.2.0/gems/ffi-1.9.3/lib/ffi_c.so
/usr/share/rvm/gems/ruby-2.2.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require' /usr/share/rvm/gems/ruby-2.2.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `block in require'
/usr/share/rvm/gems/ruby-2.2.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency' /usr/share/rvm/gems/ruby-2.2.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/usr/share/rvm/gems/ruby-2.2.0/gems/ffi-1.9.3/lib/ffi.rb:14:in `rescue in <top (required)>' /usr/share/rvm/gems/ruby-2.2.0/gems/ffi-1.9.3/lib/ffi.rb:3:in `\<top (required)\>'
/home/it/Docurated/website/rails/config/application.rb:10:in `<top (required)>' /home/it/Docurated/website/rails/Rakefile:5:in `require'
/home/it/Docurated/website/rails/Rakefile:5:in `<top (required)>' /usr/share/rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:24:in `eval'
/usr/share/rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:24:in `<main>' LoadError: cannot load such file -- 2.0/ffi_c /usr/share/rvm/gems/ruby-2.2.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/usr/share/rvm/gems/ruby-2.2.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `block in require' /usr/share/rvm/gems/ruby-2.2.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/share/rvm/gems/ruby-2.2.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require' /usr/share/rvm/gems/ruby-2.2.0/gems/ffi-1.9.3/lib/ffi.rb:9:in `\<top (required)\>'
/home/it/Docurated/website/rails/config/application.rb:10:in `<top (required)>' /home/it/Docurated/website/rails/Rakefile:5:in `require'
/home/it/Docurated/website/rails/Rakefile:5:in `<top (required)>' /usr/share/rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:24:in `eval'
/usr/share/rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:24:in \`\<main\>'
(See full trace by running task with --trace)
I have updated to newer version to downgrade, remove, reinstall, update gemfile.lock
but it haven't fix yet
I have a problem loading a gem (pg, a postgreSQL API for ruby) i have installed for ruby on windows. It was successfully installed with gem install. I downloaded Strawberry perl for the libpq libs and headers required for the pg gem. I received the following successful output:
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
Successfully installed pg-1.2.3
Parsing documentation for pg-1.2.3
Installing ri documentation for pg-1.2.3
Done installing documentation for pg after 7 seconds
1 gem installed
If I run gem list I can see the gem is also installed along with other gems:
gem list
> pg (1.2.3)
However I am unable to load it using the require method. If I try to run a script containing require 'pg' I get the following error:
C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/ruby_installer/runtime/dll_directory.rb:83:in `add_dll_directory_winapi': AddDllDirectory failed for C:/Ruby30-x from C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/ruby_installer/runtime/dll_directory.rb:50:in `initialize'
from C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/ruby_installer/runtime/singleton.rb:12:in `new'
from C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/ruby_installer/runtime/singleton.rb:12:in `add_dll_directory'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/pg-1.2.3/lib/pg.rb:15:in `block in <top (required)>'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/pg-1.2.3/lib/pg.rb:26:in `rescue in <top (required)>'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/pg-1.2.3/lib/pg.rb:4:in `<top (required)>'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `require'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `rescue in require'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:149:in `require'
from P:/Projekte/OPTIMA_910/Hydraulik/Scripts/pg_snippet.rb:2:in `<main>'
<internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': 126: The specified module could not be found. - C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/pg-1.2.3/lib/pg_ext.so (LoadError)
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/pg-1.2.3/lib/pg.rb:5:in `<top (required)>'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `require'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `rescue in require'
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:149:in `require'
from D:/Scripts/pg_snippet.rb:2:in `<main>'
<internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- pg (LoadError)
from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from D:/Scripts/pg_snippet.rb:2:in `<main>'
Likewise I try to run it as a command on irb I get a slightly different output:
Traceback (most recent call last):
14: from C:/Ruby30-x64/bin/irb.cmd:31:in `<main>'
13: from C:/Ruby30-x64/bin/irb.cmd:31:in `load'
12: from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/irb-1.3.0/exe/irb:11:in `<top (required)>'
11: from (irb):2:in `<main>'
10: from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:149:in `require'
9: from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `rescue in require'
8: from <internal:C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `require'
7: from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/pg-1.2.3/lib/pg.rb:4:in `<top (required)>'
6: from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/pg-1.2.3/lib/pg.rb:26:in `rescue in <top (required)>'
5: from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/pg-1.2.3/lib/pg.rb:15:in `block in <top (required)>'
4: from C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/ruby_installer/runtime/singleton.rb:12:in `add_dll_directory'
3: from C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/ruby_installer/runtime/singleton.rb:12:in `new'
2: from C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/ruby_installer/runtime/dll_directory.rb:50:in `initialize'
1: from C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/ruby_installer/runtime/dll_directory.rb:83:in `add_dll_directory_winapi'
RubyInstaller::Runtime::DllDirectory::WinApiError (AddDllDirectory failed for C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/pg-1.2.3/lib/x64-mingw32)
irb(main):003:0> gem list
Traceback (most recent call last):
5: from C:/Ruby30-x64/bin/irb.cmd:31:in `<main>'
4: from C:/Ruby30-x64/bin/irb.cmd:31:in `load'
3: from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/irb-1.3.0/exe/irb:11:in `<top (required)>'
2: from (irb):2:in `<main>'
1: from (irb):3:in `rescue in <main>'
NameError (undefined local variable or method `list' for main:Object)
irb(main):004:0> C:/Ruby30-x64/lib/ruby/3.0.0/reline/unicode.rb:124:in `calculate_width': undefined method `encode' for nil:NilClass (NoMethodError)
from C:/Ruby30-x64/lib/ruby/3.0.0/reline/line_editor.rb:1314:in `calculate_width'
from C:/Ruby30-x64/lib/ruby/3.0.0/reline/line_editor.rb:126:in `check_multiline_prompt'
from C:/Ruby30-x64/lib/ruby/3.0.0/reline/line_editor.rb:365:in `rerender'
from C:/Ruby30-x64/lib/ruby/3.0.0/reline.rb:248:in `block (3 levels) in inner_readline'
from C:/Ruby30-x64/lib/ruby/3.0.0/reline.rb:246:in `each'
from C:/Ruby30-x64/lib/ruby/3.0.0/reline.rb:246:in `block (2 levels) in inner_readline'
from C:/Ruby30-x64/lib/ruby/3.0.0/reline.rb:330:in `block in read_io'
from C:/Ruby30-x64/lib/ruby/3.0.0/reline.rb:284:in `loop'
from C:/Ruby30-x64/lib/ruby/3.0.0/reline.rb:284:in `read_io'
from C:/Ruby30-x64/lib/ruby/3.0.0/reline.rb:245:in `block in inner_readline'
from C:/Ruby30-x64/lib/ruby/3.0.0/reline.rb:243:in `loop'
from C:/Ruby30-x64/lib/ruby/3.0.0/reline.rb:243:in `inner_readline'
from C:/Ruby30-x64/lib/ruby/3.0.0/reline.rb:175:in `readmultiline'
from C:/Ruby30-x64/lib/ruby/3.0.0/forwardable.rb:238:in `readmultiline'
from C:/Ruby30-x64/lib/ruby/3.0.0/forwardable.rb:238:in `readmultiline'
from C:/Ruby30-x64/lib/ruby/3.0.0/irb/input-method.rb:302:in `gets'
from C:/Ruby30-x64/lib/ruby/3.0.0/irb.rb:519:in `block (2 levels) in eval_input'
from C:/Ruby30-x64/lib/ruby/3.0.0/irb.rb:721:in `signal_status'
from C:/Ruby30-x64/lib/ruby/3.0.0/irb.rb:518:in `block in eval_input'
from C:/Ruby30-x64/lib/ruby/3.0.0/irb/ruby-lex.rb:202:in `lex'
from C:/Ruby30-x64/lib/ruby/3.0.0/irb/ruby-lex.rb:174:in `block (2 levels) in each_top_level_statement'
from C:/Ruby30-x64/lib/ruby/3.0.0/irb/ruby-lex.rb:171:in `loop'
from C:/Ruby30-x64/lib/ruby/3.0.0/irb/ruby-lex.rb:171:in `block in each_top_level_statement'
from C:/Ruby30-x64/lib/ruby/3.0.0/irb/ruby-lex.rb:170:in `catch'
from C:/Ruby30-x64/lib/ruby/3.0.0/irb/ruby-lex.rb:170:in `each_top_level_statement'
from C:/Ruby30-x64/lib/ruby/3.0.0/irb.rb:537:in `eval_input'
from C:/Ruby30-x64/lib/ruby/3.0.0/irb.rb:472:in `block in run'
from C:/Ruby30-x64/lib/ruby/3.0.0/irb.rb:471:in `catch'
from C:/Ruby30-x64/lib/ruby/3.0.0/irb.rb:471:in `run'
from C:/Ruby30-x64/lib/ruby/3.0.0/irb.rb:400:in `start'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/irb-1.3.0/exe/irb:11:in `<top (required)>'
from C:/Ruby30-x64/bin/irb.cmd:31:in `load'
from C:/Ruby30-x64/bin/irb.cmd:31:in `<main>'
I hope there is only some extra path I need to specify. I am also not using rails btw. Any help would be greatly appreciated! If anyone else has a good suggestion for an alternative for pg I might also be open to considering that.
Thanks in advance
Included in gem file:
gem "google_drive", "~> 2.0"
I have tried using:
require "google_drive"
require "googleauth"
I am getting the following error. Please help.
LoadError: cannot load such file -- googleauth
/Users/tushar/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.5/lib/active_support/dependencies.rb:293:in require' /Users/tushar/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.5/lib/active_support/dependencies.rb:293:in block in require'
/Users/tushar/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.5/lib/active_support/dependencies.rb:259:in load_dependency' /Users/tushar/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.5/lib/active_support/dependencies.rb:293:in require'
/Users/tushar/.rvm/gems/ruby-2.4.1/gems/google_drive-2.1.2/lib/google_drive.rb:5:in <top (required)>' /Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/lib/bundler/runtime.rb:81:in require'
/Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/lib/bundler/runtime.rb:81:in block (2 levels) in require' /Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/lib/bundler/runtime.rb:76:in each'
/Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/lib/bundler/runtime.rb:76:in block in require' /Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/lib/bundler/runtime.rb:65:in each'
/Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/lib/bundler/runtime.rb:65:in require' /Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/lib/bundler.rb:114:in require'
/Users/tushar/Documents/../../../config/application.rb:23:in <top (required)>' /Users/tushar/Documents/../../../Rakefile:4:in require_relative'
/Users/tushar/Documents/../../Rakefile:4:in <top (required)>' /Users/tushar/.rvm/gems/ruby-2.4.1/gems/rake-12.3.1/exe/rake:27:in <top (required)>'
/Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:74:in load' /Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:74:in kernel_load'
/Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:28:in run' /Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/lib/bundler/cli.rb:463:in exec'
/Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' /Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in invoke_command'
/Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor.rb:387:in dispatch' /Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/lib/bundler/cli.rb:27:in dispatch'
/Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in start' /Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/lib/bundler/cli.rb:18:in start'
/Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/exe/bundle:30:in block in <top (required)>' /Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/lib/bundler/friendly_errors.rb:124:in with_friendly_errors'
/Users/tushar/.rvm/gems/ruby-2.4.1/gems/bundler-1.17.1/exe/bundle:22:in <top (required)>' /Users/tushar/.rvm/gems/ruby-2.4.1/bin/bundle:23:in load'
/Users/tushar/.rvm/gems/ruby-2.4.1/bin/bundle:23:in <main>' /Users/tushar/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:24:in eval'
/Users/tushar/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:24:in `
'
(See full trace by running task with --trace)
It is there on my machine.
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?
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.