Skip to content

Conversation

@maxhawkins
Copy link

I ran into some trouble while trying to use sproutcore with pow.cx. I added this config.ru to my sproutcore project

require 'rubygems'  
require 'bundler/setup'

require 'sproutcore'  

root = Pathname(__FILE__).dirname.expand_path  
project = SC::Project.load_nearest_project(root, :parent => SC.builtin_project)  
service = SC::Rack::Service.new(project)  
run service

But ran into errors while trying to fetch "/sc/targets.json"

It turns out the rack app that serves that file was passing a raw string as content and strings don't respond to #each as of 1.9.2 so it choked. This change makes SC::Rack::Dev and all of the other Rack apps in abbot that return a string return an array instead.

Sorry there aren't any failing tests. I couldn't find a convenient place to add them. All of the tests still pass.

String#each was removed in Ruby 1.9.2. The content returned by a rack app must respond to #each.
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

Successfully merging this pull request may close these issues.

1 participant