Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in reel gem: uninitialized constant HTTP::Response::STATUS_CODES (NameError) #92

Open
parke opened this issue Aug 12, 2016 · 6 comments

Comments

@parke
Copy link

parke commented Aug 12, 2016

I just manually built and installed ruby.

$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]

I then ran:

$ export GEM_HOME=$HOME/local/gems
$ gem install airplay
$ gem install airplay-cli

I had to install the package libavahi-compat-libdnssd-dev to provide the file dns_sd.h. I am running on Ubuntu 14.04. I have never used Ruby before. (One of the gems required Ruby 2, which is why I built Ruby manually. Ubuntu 14.04 comes with Ruby 1.9.)

air crashes after startup.

$ ./air list
I, [2016-08-12T16:14:53.078602 #2844]  INFO -- : Celluloid 0.17.3 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
/home/bake/local/gems/gems/reel-0.5.0/lib/reel/response.rb:10:in `<class:Response>': uninitialized constant HTTP::Response::STATUS_CODES (NameError)
    from /home/bake/local/gems/gems/reel-0.5.0/lib/reel/response.rb:4:in `<module:Reel>'
    from /home/bake/local/gems/gems/reel-0.5.0/lib/reel/response.rb:3:in `<top (required)>'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/bake/local/gems/gems/reel-0.5.0/lib/reel.rb:12:in `<top (required)>'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/bake/local/gems/gems/reel-rack-0.2.3/lib/reel/rack/server.rb:3:in `<top (required)>'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/bake/local/gems/gems/reel-rack-0.2.3/lib/rack/handler/reel.rb:1:in `<top (required)>'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/bake/local/gems/gems/reel-rack-0.2.3/lib/reel/rack.rb:2:in `<top (required)>'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/bake/local/gems/gems/airplay-1.0.5/lib/airplay/server.rb:4:in `<top (required)>'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/bake/local/gems/gems/airplay-1.0.5/lib/airplay/player.rb:8:in `<top (required)>'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/bake/local/gems/gems/airplay-1.0.5/lib/airplay/playable.rb:1:in `<top (required)>'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/bake/local/gems/gems/airplay-1.0.5/lib/airplay/device.rb:2:in `<top (required)>'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/bake/local/gems/gems/airplay-1.0.5/lib/airplay/devices.rb:2:in `<top (required)>'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/bake/local/gems/gems/airplay-1.0.5/lib/airplay/browser.rb:5:in `<top (required)>'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/bake/local/gems/gems/airplay-1.0.5/lib/airplay.rb:2:in `<top (required)>'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/bake/local/gems/gems/airplay-1.0.5/lib/airplay/cli.rb:2:in `<top (required)>'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/bake/package/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/bake/local/gems/gems/airplay-cli-1.0.3/bin/air:4:in `<top (required)>'
    from ./air:23:in `load'
    from ./air:23:in `<main>'

exit  1

Does anyone have any suggestions? Thanks!

@NullVoxPopuli
Copy link

I also get this error

@akras14
Copy link

akras14 commented Oct 15, 2016

+1

@skerit
Copy link

skerit commented Oct 19, 2016

I'm getting the same error on Ubuntu 16.04

@therimalaya
Copy link

Me too!

@sasikiran
Copy link

Same error on OS X running ruby 2.3.0 using rvm.

@digglife
Copy link

That's because HTTP::Response::STATUS_CODES has already been deprecated by http since 1.0.0. You can refer to the changelog of the http gem.

So the solution is pretty simple. Uninstall the http in your system, then install 0.9.9 specifically.

gem uninstall http
gem install http -v 0.9.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants