Ruby on Rails test and console both exit with cache_control error - ruby-on-rails

I'm stumped. rails test and rails console suddenly stopped working for my project and I can't find any recent changes I've made to cause the problem. Running either throws this error:
/var/lib/gems/2.3.0/gems/actionpack-5.1.7/lib/action_dispatch/http/response.rb:89:in `<class:Response>': undefined method `cache_control' for class `ActionDispatch::Response' (NameError)
from /var/lib/gems/2.3.0/gems/actionpack-5.1.7/lib/action_dispatch/http/response.rb:35:in `<module:ActionDispatch>'
from /var/lib/gems/2.3.0/gems/actionpack-5.1.7/lib/action_dispatch/http/response.rb:6:in `<top (required)>'
from /var/lib/gems/2.3.0/gems/actionpack-5.1.7/lib/action_controller/metal/live.rb:1:in `require'
from /var/lib/gems/2.3.0/gems/actionpack-5.1.7/lib/action_controller/metal/live.rb:1:in `<top (required)>'
from /var/lib/gems/2.3.0/gems/actionpack-5.1.7/lib/action_controller.rb:4:in `require'
from /var/lib/gems/2.3.0/gems/actionpack-5.1.7/lib/action_controller.rb:4:in `<top (required)>'
from /var/lib/gems/2.3.0/gems/actionpack-5.1.7/lib/action_controller/railtie.rb:2:in `require'
from /var/lib/gems/2.3.0/gems/actionpack-5.1.7/lib/action_controller/railtie.rb:2:in `<top (required)>'
from /var/lib/gems/2.3.0/gems/activerecord-5.1.7/lib/active_record/railtie.rb:9:in `require'
from /var/lib/gems/2.3.0/gems/activerecord-5.1.7/lib/active_record/railtie.rb:9:in `<top (required)>'
from /var/lib/gems/2.3.0/gems/railties-5.1.7/lib/rails/all.rb:14:in `require'
from /var/lib/gems/2.3.0/gems/railties-5.1.7/lib/rails/all.rb:14:in `block in <top (required)>'
from /var/lib/gems/2.3.0/gems/railties-5.1.7/lib/rails/all.rb:12:in `each'
from /var/lib/gems/2.3.0/gems/railties-5.1.7/lib/rails/all.rb:12:in `<top (required)>'
from /home/jeff/src/rails/sfpix/config/application.rb:3:in `require'
from /home/jeff/src/rails/sfpix/config/application.rb:3:in `<top (required)>'
from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/application.rb:92:in `require'
from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/application.rb:92:in `preload'
from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/application.rb:153:in `serve'
from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/application.rb:141:in `block in run'
from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/application.rb:135:in `loop'
from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/application.rb:135:in `run'
from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in `<top (required)>'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
Googling hasn't produced any helpful suggestions. I've tried checking out earlier working commits and running bundle install to downgrade gems using their Gemfile.lock files, but I still get the same error message.
If I chdir into other Rails projects, rails test and rails console work fine.
Does anyone have any ideas of where to start looking?
Thanks very much,
Jeff

Someone on Github suggested I upgrade to at least Rack 2.0. That immediately fixed my problem. 🙂

Related

Error with rails server

yahya#pc ~/RubymineProjects/depot $ rails server
/home/yahya/.rvm/gems/ruby-2.2.3/gems/activesupport-3.1.3/lib/active_support/values/time_zone.rb:268: warning: circular argument reference - now
/home/yahya/.rvm/gems/ruby-2.2.3/gems/capistrano-2.15.7/lib/capistrano/configuration/loading.rb:18:in `instance': Please require this file from within a Capistrano recipe (LoadError)
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano/helpers/base.rb:16:in `rvm_with_capistrano'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano/helpers/_cset.rb:3:in `<top (required)>'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano/base.rb:1:in `require'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano/base.rb:1:in `<top (required)>'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano/selector.rb:1:in `require'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano/selector.rb:1:in `<top (required)>'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano.rb:3:in `require'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano.rb:3:in `<top (required)>'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:92:in `require'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:92:in `rescue in block in require'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:69:in `block in require'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:62:in `each'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/bundler-1.12.0.pre.1/lib/bundler/runtime.rb:62:in `require'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/bundler-1.12.0.pre.1/lib/bundler.rb:102:in `require'
from /home/yahya/RubymineProjects/depot/config/application.rb:7:in `<top (required)>'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/railties-3.1.3/lib/rails/commands.rb:52:in `require'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/railties-3.1.3/lib/rails/commands.rb:52:in `block in <top (required)>'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/railties-3.1.3/lib/rails/commands.rb:49:in `tap'
from /home/yahya/.rvm/gems/ruby-2.2.3/gems/railties-3.1.3/lib/rails/commands.rb:49:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
It used to work but all of sudden, I got this.
It used to work but all of sudden, I got this.
That's unlikely.
Apparently, you've updated your version of Ruby since the last time you ran your Rails application. The solution is to revert Ruby to whatever version you used when you built your Rails app, or to bring both Rails and Ruby to a current and mutually compatible version.

ruby-on-rails server crashes with 'incompatible library version'

I have a new installation of ruby on rails on a recently updated mac, with the most recent version of ruby installed on it. I created my first new rails application, with the command:rails new blog
The app was created without any error messages. However, when I move into the new directory and run bin/rails server the server build fails with a long list of error messages:
/Users/antony1/.rvm/gems/ruby-2.3.0/gems/debug_inspector-0.0.2/lib/debug_inspector.rb:6:in `require': incompatible library version - /Users/antony1/.rvm/gems/ruby-2.3.0/gems/debug_inspector-0.0.2/lib/debug_inspector.bundle (fatal)
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/debug_inspector-0.0.2/lib/debug_inspector.rb:6:in `<top (required)>'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/binding_of_caller-0.7.2/lib/binding_of_caller/mri2.rb:1:in `require'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/binding_of_caller-0.7.2/lib/binding_of_caller/mri2.rb:1:in `<top (required)>'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/binding_of_caller-0.7.2/lib/binding_of_caller.rb:9:in `require'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/binding_of_caller-0.7.2/lib/binding_of_caller.rb:9:in `<top (required)>'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/web-console-2.3.0/lib/web_console.rb:1:in `require'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/web-console-2.3.0/lib/web_console.rb:1:in `<top (required)>'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/web-console-2.3.0/lib/web-console.rb:1:in `require'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/web-console-2.3.0/lib/web-console.rb:1:in `<top (required)>'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `block (2 levels) in require'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /Users/antony1/Documents/Ruby/Rails/blog/config/application.rb:7:in `<top (required)>'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:78:in `require'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/antony1/.rvm/gems/ruby-2.3.0#global/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/antony1/Documents/Ruby/Rails/blog/bin/rails:9:in `require'
from /Users/antony1/Documents/Ruby/Rails/blog/bin/rails:9:in `<top (required)>'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/spring-1.6.2/lib/spring/client/rails.rb:28:in `load'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/spring-1.6.2/lib/spring/client/rails.rb:28:in `call'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/spring-1.6.2/lib/spring/client/command.rb:7:in `call'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/spring-1.6.2/lib/spring/client.rb:28:in `run'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/spring-1.6.2/bin/spring:49:in `<top (required)>'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/spring-1.6.2/lib/spring/binstub.rb:11:in `load'
from /Users/antony1/.rvm/gems/ruby-2.3.0/gems/spring-1.6.2/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/antony1/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/antony1/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/antony1/Documents/Ruby/Rails/blog/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
I've run gem pristine --all and made sure that my gems were up to date, but I am still unable to get this to work. Any assistance would be appreciated.
After intializing a rails app, especially when you edit the Gemfile file, you need to run, it's generally a good idea to run bundle install to establish all the dependencies. Have you done that that?

How to solve: `<module:Hashie>': superclass mismatch for class Rash (TypeError)

Suddenly I cannot run the server. It throws following output:
Heading ##/home/action/.gem/ruby/2.1.1/gems/rash-0.2.0/lib/rash.rb:5:in `': superclass mismatch for class Rash (TypeError)
from /home/action/.gem/ruby/2.1.1/gems/rash-0.2.0/lib/rash.rb:4:in `<top (required)>'
from /home/action/.gem/ruby/2.1.1/gems/buff-0.0.6/lib/buff.rb:4:in `require'
from /home/action/.gem/ruby/2.1.1/gems/buff-0.0.6/lib/buff.rb:4:in `<top (required)>'
from /home/action/.gem/ruby/2.1.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `require'
from /home/action/.gem/ruby/2.1.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/action/.gem/ruby/2.1.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `each'
from /home/action/.gem/ruby/2.1.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `block in require'
from /home/action/.gem/ruby/2.1.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `each'
from /home/action/.gem/ruby/2.1.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `require'
from /home/action/.gem/ruby/2.1.1/gems/bundler-1.6.2/lib/bundler.rb:132:in `require'
from /home/action/colocofg_pg/config/application.rb:7:in `<top (required)>'
from /home/action/.gem/ruby/2.1.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:79:in `require'
from /home/action/.gem/ruby/2.1.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:79:in `block in server'
from /home/action/.gem/ruby/2.1.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `tap'
from /home/action/.gem/ruby/2.1.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `server'
from /home/action/.gem/ruby/2.1.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /home/action/.gem/ruby/2.1.1/gems/railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'
from /home/action/colocofg_pg/bin/rails:8:in `require'
from /home/action/colocofg_pg/bin/rails:8:in `<top (required)>'
from /home/action/.gem/ruby/2.1.1/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
from /home/action/.gem/ruby/2.1.1/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
from /home/action/.gem/ruby/2.1.1/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
from /home/action/.gem/ruby/2.1.1/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
from /home/action/.gem/ruby/2.1.1/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
from /home/action/.gem/ruby/2.1.1/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
from /home/action/.gem/ruby/2.1.1/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/action/.parts/packages/ruby2.1/2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/action/.parts/packages/ruby2.1/2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/action/colocofg_pg/bin/spring:16:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
The last gems I installed were Buff (github.com/zph/buff) and omniauth-buffer2 (github.com/bufferapp/omniauth-buffer2). And thet it startet trhrowing the messages.
What is causing that mismatch and how to solve it?
I came across this same error after installing these two gems. The problem is that in their documentation, Buffer says to use the "buff" gem when you should be using the "buffer" gem at github.com/bufferapp/buffer-ruby. They forked from github.com/zph/buff a few months ago.
Add the following two gems to your Gemfile:
gem 'buffer', :github => 'bufferapp/buffer-ruby'
gem 'omniauth-buffer2'
And then in your config/(name).rb
Rails.application.config.middleware.use OmniAuth::Builder do
provider :buffer, ENV['BUFFER_KEY'], ENV['BUFFER_SECRET']
end
And you're good to go!
Just uninstall ALL versions of Rash and ALL versions of whatever other gems you installed since you last ran the app (since before the error occurred) and then reinstall the latest versions. You can see all your gems by running "gem list"
There was likely a bug in one or more prior API versions calling the same class.
This happened to me with Rash and the Factual API, and reinstalling only the most recent versions fixed it!

Error running rspec?

I'm working on a Rails app and testing using Rspec. Unfortunately when I try to run bundle exec rspec I'm met with a giant wall of error text (below).
The first line I see is a warning about Nokogiri, but I suspect that is unrelated to the main issue at hand.
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8
Could not open library 'kernel32': dlopen(kernel32, 5): image not found.
Could not open library 'libkernel32.dylib': dlopen(libkernel32.dylib, 5): image not found (LoadError)
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/library.rb:123:in `block in ffi_lib'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/library.rb:90:in `map'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/ffi-1.9.0/lib/ffi/library.rb:90:in `ffi_lib'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rb-fchange-0.0.5/lib/rb-fchange/native.rb:10:in `<module:Native>'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rb-fchange-0.0.5/lib/rb-fchange/native.rb:8:in `<module:FChange>'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rb-fchange-0.0.5/lib/rb-fchange/native.rb:3:in `<top (required)>'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rb-fchange-0.0.5/lib/rb-fchange.rb:1:in `<top (required)>'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
/Users/varunrau/Documents/curr/BPSF/config/application.rb:7:in `<top (required)>'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/app_framework/rails.rb:48:in `preload_rails'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/app_framework/rails.rb:7:in `preload'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/test_framework.rb:134:in `block in preload'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork.rb:62:in `exec_prefork'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/test_framework.rb:120:in `preload'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/run_strategy/forking.rb:25:in `preload'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/runner.rb:74:in `run'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/lib/spork/runner.rb:10:in `run'
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/spork-0.9.2/bin/spork:10:in `<top (required)>'
/usr/local/Cellar/ruby/1.9.3-p194/bin/spork:23:in `load'
/usr/local/Cellar/ruby/1.9.3-p194/bin/spork:23:in `<main>'
My system details are: OS X 10.8, Rails 3.2.13, Ruby 1.9.3p194. I tried reinstalling Ruby and the rb-fchange gem as per some advice on this site, but nothing has worked.
Thanks so much for the help!

Error with rails after update to 4.0.0.rc1

recently I have updated to rails 4.0.0.rc1 and I have been experiencing a few errors. I am currently using RVM as well. After creating a rails 4 app and running 'rails s' or 'rspec rails' i got the error -
/Users/metaHunts/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7/lib/json/common.rb:67:in `initialize': no implicit conversion of nil into Hash (TypeError)
from /Users/metaHunts/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7/lib/json/common.rb:67:in `new'
from /Users/metaHunts/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7/lib/json/common.rb:67:in `generator='
from /Users/metaHunts/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7/lib/json/ext.rb:17:in `<module:Ext>'
from /Users/metaHunts/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7/lib/json/ext.rb:12:in `<module:JSON>'
from /Users/metaHunts/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7/lib/json/ext.rb:9:in `<top (required)>'
from /Users/metaHunts/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7/lib/json.rb:58:in `require'
from /Users/metaHunts/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7/lib/json.rb:58:in `<module:JSON>'
from /Users/metaHunts/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7/lib/json.rb:54:in `<top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0.rc1/lib/active_support/core_ext/object/to_json.rb:3:in `require'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0.rc1/lib/active_support/core_ext/object/to_json.rb:3:in `<top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0.rc1/lib/active_support/core_ext/object.rb:11:in `require'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0.rc1/lib/active_support/core_ext/object.rb:11:in `<top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/configuration.rb:3:in `require'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/configuration.rb:3:in `<top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/railtie.rb:2:in `require'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/railtie.rb:2:in `<top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/engine.rb:1:in `require'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/engine.rb:1:in `<top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/application.rb:4:in `require'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/application.rb:4:in `<top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails.rb:9:in `require'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails.rb:9:in `<top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-4.0.0.rc1/lib/active_record/railtie.rb:2:in `require'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-4.0.0.rc1/lib/active_record/railtie.rb:2:in `<top (required)>'
from /Users/metaHunts/Desktop/TeenStarter/config/application.rb:4:in `require'
from /Users/metaHunts/Desktop/TeenStarter/config/application.rb:4:in `<top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:78:in `require'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:78:in `block in <top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:75:in `tap'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:75:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I have tried reloading rvm, cleaing and repairing it as well yet I keep getting the same error. Could I please have some help in fixing it.
Thanks in advance :)
Had the same problem. For some reason I don't know it got fixed by running:
gem install json -v 1.7.7
Solved by removing RVM with
rvm implode
before reinstalling it with the command on rvm website (https://rvm.io/).

Resources