このエラーの原因を知っている人はいますか? 基本的なラック アプリケーションを作成しようとしています。
App.rb =>
class Cherry
class << self
def app &block
Cherry::Application.new &block
end
end
class Application
def initialize &block
instance_eval &block
end
def print_start_message
puts "Starting server"
end
def call env
[200, {"Content-type" => "text/plain"}, "Hello World"]
end
end
end
Config.ru =>
require 'app'
run Cherry.app do
print_start_message
end
編集:どうやら、エラー woops を含めるのを忘れていたようです:
/local/www/cherry/lib/app.rb:12:in 'instance_eval': block not supplied (ArgumentError)