Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次の行に「アプリケーション エラー」があります。
get '/' do time = Time.new content_type :json returnValue = { "day" => "%02d" % time.day, "month" => "%02d" % time.month, "year" => #{time.year} }\ .to_json "#{returnValue}" end
私は何を間違っていますか?
一部:
{time.year}
は有効な Ruby オブジェクトではありません。
"year" => #{time.year}
と同じです
"year" =>
これはハッシュを閉じず、有効な Ruby オブジェクトではありません。