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

CloudKit crash if rack >= 1.4 is installed #3

Open
prathe opened this issue Feb 19, 2012 · 1 comment
Open

CloudKit crash if rack >= 1.4 is installed #3

prathe opened this issue Feb 19, 2012 · 1 comment

Comments

@prathe
Copy link

prathe commented Feb 19, 2012

I wanted to try the curl demo

and the following command crashed

$ rackup config.ru

/Users/prathe/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/cloudkit-0.11.2/lib/cloudkit/rack/builder.rb:43:in `expose': undefined method `<<' for nil:NilClass (NoMethodError)
  from /Users/prathe/src/demo/cloudkit/config.ru:3:in `block in <main>'
  from /Users/prathe/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
  from /Users/prathe/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
  from /Users/prathe/src/demo/cloudkit/config.ru:1:in `new'
  from /Users/prathe/src/demo/cloudkit/config.ru:1:in `<main>'
  from /Users/prathe/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
  from /Users/prathe/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
  from /Users/prathe/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
  from /Users/prathe/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
  from /Users/prathe/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
  from /Users/prathe/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:137:in `start'
  from /Users/prathe/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.4.1/bin/rackup:4:in `<top (required)>'
  from /Users/prathe/.rbenv/versions/1.9.2-p290/bin/rackup:19:in `load'
  from /Users/prathe/.rbenv/versions/1.9.2-p290/bin/rackup:19:in `<main>'

I had rack 1.4.1 installed and after

$ gem uninstall -v '>=1.4' rack

I had no problems

prathe added a commit to prathe/cloudkit that referenced this issue Feb 19, 2012
@prathe
Copy link
Author

prathe commented Feb 19, 2012

Even with this fix, the rackup binary won't load the specified Rack version since it looks like this:

#!/usr/bin/env ruby

require "rack"
Rack::Server.start

This is an inline rackup replacement that will load the good rack version.

$ ruby -e "gem 'rack', '=1.3.6'; require 'rack'; Rack::Server.start" config.ru

You may have to adjust the rack version specified above depending on which rack version you have installed.

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

1 participant