fernyb / Sequel-J

A MySQL Client written in Cappuccino (work in progress)
31 stars 1 forks source link

Problem with server... sorry #3

Closed joehoyle closed 13 years ago

joehoyle commented 13 years ago

Hey Again,

I have been trying to get the server running, I have installed all dependancies, but when I launch the web server and visit localhost:3000 I get:

Boot Error

Something went wrong while loading config.ru

SyntaxError: ./app.rb:50: odd number list for Hash { connected: @connected, error: @error.to_... ^ ./app.rb:50: syntax error, unexpected ':', expecting '}' { connected: @connected, error: @error.to_... ^ ./app.rb:50: syntax error, unexpected ':', expecting '=' ... connected: @connected, error: @error.to_s, path: request.pa... ^ ./app.rb:50: syntax error, unexpected ':', expecting '=' ...ted, error: @error.to_s, path: request.path_info }.merge!(kv... ^ ./app.rb:50: syntax error, unexpected '}', expecting kEND ...o_s, path: request.path_info }.merge!(kv).to_json ^ ./app.rb:65: syntax error, unexpected ':', expecting kEND render databases: @mysql.list_dbs ^ ./app.rb:67: syntax error, unexpected ':', expecting kEND render databases: [] ^ ./app.rb:73: syntax error, unexpected ':', expecting kEND render tables: @mysql.list_tables ^ ./app.rb:75: syntax error, unexpected ':', expecting kEND render tables: [] ^ ./app.rb:94: syntax error, unexpected ':', expecting kEND render columns: columns ^ ./app.rb:99: syntax error, unexpected ':', expecting kEND render header_names: names ^ ./app.rb:113: syntax error, unexpected ':', expecting kEND render rows: rows ^ ./app.rb:135: syntax error, unexpected ':', expecting kEND render fields: fields ^ ./app.rb:157: syntax error, unexpected ':', expecting kEND render indexes: fields ^ ./app.rb:168: odd number list for Hash name: '', ^ ./app.rb:168: syntax error, unexpected ':', expecting '}' name: '', ^ ./app.rb:173: syntax error, unexpected '}', expecting kEND ./app.rb:174: odd number list for Hash row.merge!({ name: $1 }) if part =~ /CONSTRAINT ... ^ ./app.rb:174: syntax error, unexpected ':', expecting '}' row.merge!({ name: $1 }) if part =~ /CONSTRAINT ... ^ ./app.rb:179: odd number list for Hash row.merge!({ foreign_key: fields }) ^ ./app.rb:179: syntax error, unexpected ':', expecting '}' row.merge!({ foreign_key: fields }) ^ ./app.rb:183: odd number list for Hash row.merge!({ reference_table: $1 }) ^ ./app.rb:183: syntax error, unexpected ':', expecting '}' row.merge!({ reference_table: $1 }) ^ ./app.rb:187: odd number list for Hash row.merge!({ reference_key: fields }) ^ ./app.rb:187: syntax error, unexpected ':', expecting '}' row.merge!({ reference_key: fields }) ^ ./app.rb:190: odd number list for Hash row.merge!({ on_delete: $1 }) if part =~ /ON DELETE (... ^ ./app.rb:190: syntax error, unexpected ':', expecting '}' row.merge!({ on_delete: $1 }) if part =~ /ON DELETE (... ^ ./app.rb:191: odd number list for Hash row.merge!({ on_update: $1 }) if part =~ /ON UPDATE (... ^ ./app.rb:191: syntax error, unexpected ':', expecting '}' row.merge!({ on_update: $1 }) if part =~ /ON UPDATE (... ^ ./app.rb:195: syntax error, unexpected ':', expecting kEND render relations: relations ^ ./app.rb:200: syntax error, unexpected ':', expecting kEND render sql: sql ^ ./app.rb:208: odd number list for Hash name: item[0], ^ ./app.rb:208: syntax error, unexpected ':', expecting '}' name: item[0], ^ ./app.rb:209: syntax error, unexpected ':', expecting '=' engine: item[1], ^ ./app.rb:210: syntax error, unexpected ':', expecting '=' version: item[2], ^ ./app.rb:211: syntax error, unexpected ':', expecting '=' row_format: item[3], ^ ./app.rb:212: syntax error, unexpected ':', expecting '=' rows: item[4], ^ ./app.rb:213: syntax error, unexpected ':', expecting '=' avg_row_length: item[5], ^ ./app.rb:214: syntax error, unexpected ':', expecting '=' data_length: item[6], ^ ./app.rb:215: syntax error, unexpected ':', expecting '=' max_data_length: item[7], ^ ./app.rb:216: syntax error, unexpected ':', expecting '=' index_length: item[8], ^ ./app.rb:217: syntax error, unexpected ':', expecting '=' data_free: item[9], ^ ./app.rb:218: syntax error, unexpected ':', expecting '=' auto_increment: item[10], ^ ./app.rb:219: syntax error, unexpected ':', expecting '=' create_time: item[11], ^ ./app.rb:220: syntax error, unexpected ':', expecting '=' update_time: item[12], ^ ./app.rb:221: syntax error, unexpected ':', expecting '=' check_time: item[13], ^ ./app.rb:222: syntax error, unexpected ':', expecting '=' collation: item[14], ^ ./app.rb:223: syntax error, unexpected ':', expecting '=' checksum: item[15], ^ ./app.rb:224: syntax error, unexpected ':', expecting '=' create_options: item[16], ^ ./app.rb:225: syntax error, unexpected ':', expecting '=' comment: item[17] ^ ./app.rb:227: syntax error, unexpected '}', expecting kEND }.first ^ ./app.rb:234: odd number list for Hash ...t.map {|item| {collation_name: item[0], collate_set_name: it... ^ ./app.rb:234: syntax error, unexpected ':', expecting '}' ...t.map {|item| {collation_name: item[0], collate_set_name: it... ^ ./app.rb:234: syntax error, unexpected ':', expecting '=' ...me: item[0], collate_set_name: item[1], description: item[2]... ^ ./app.rb:234: syntax error, unexpected ':', expecting '=' ...et_name: item[1], description: item[2]} } ^ ./app.rb:234: syntax error, unexpected '}', expecting kEND ./app.rb:238: odd number list for Hash ...t.map {|item| {collation_name: item[0], character_set_name: ... ^ ./app.rb:238: syntax error, unexpected ':', expecting '}' ...t.map {|item| {collation_name: item[0], character_set_name: ... ^ ./app.rb:238: syntax error, unexpected ':', expecting '=' ...: item[0], character_set_name: item[1], id: item[2]} } ^ ./app.rb:238: syntax error, unexpected ':', expecting '=' ...aracter_set_name: item[1], id: item[2]} } ^ ./app.rb:238: syntax error, unexpected '}', expecting kEND ./app.rb:246: syntax error, unexpected ':', expecting kEND render status: status, engines: engines, enc... ^ ./app.rb:246: syntax error, unexpected ':', expecting '=' ...ender status: status, engines: engines, encodings: encodings... ^ ./app.rb:246: syntax error, unexpected ':', expecting '=' ..., engines: engines, encodings: encodings, collations: collat... ^ ./app.rb:246: syntax error, unexpected ':', expecting '=' ...odings: encodings, collations: collations, sql: sql ^ ./app.rb:246: syntax error, unexpected ':', expecting '=' ..., collations: collations, sql: sql ^ ./app.rb:252: syntax error, unexpected $end, expecting kEND

config.ru:12:in `require'
config.ru:12:in `inner_app'
/Library/Ruby/Gems/1.8/gems/rack-1.3.0/lib/rack/builder.rb:51:in `instance_eval'
/Library/Ruby/Gems/1.8/gems/rack-1.3.0/lib/rack/builder.rb:51:in `initialize'
config.ru:1:in `new'
config.ru:1:in `inner_app'
/Library/Ruby/Gems/1.8/gems/shotgun-0.9/lib/shotgun/loader.rb:102:in `eval'
/Library/Ruby/Gems/1.8/gems/shotgun-0.9/lib/shotgun/loader.rb:112:in `inner_app'
/Library/Ruby/Gems/1.8/gems/shotgun-0.9/lib/shotgun/loader.rb:102:in `assemble_app'
/Library/Ruby/Gems/1.8/gems/shotgun-0.9/lib/shotgun/loader.rb:86:in `proceed_as_child'
/Library/Ruby/Gems/1.8/gems/shotgun-0.9/lib/shotgun/loader.rb:31:in `call!'
/Library/Ruby/Gems/1.8/gems/shotgun-0.9/lib/shotgun/loader.rb:18:in `call'
/Library/Ruby/Gems/1.8/gems/shotgun-0.9/lib/shotgun/favicon.rb:12:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.3.0/lib/rack/builder.rb:134:in `call'
/Library/Ruby/Gems/1.8/gems/rack-1.3.0/lib/rack/handler/webrick.rb:59:in `service'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/Library/Ruby/Gems/1.8/gems/rack-1.3.0/lib/rack/handler/webrick.rb:13:in `run'
/Library/Ruby/Gems/1.8/gems/shotgun-0.9/bin/shotgun:156
/usr/bin/shotgun:19:in `load'
/usr/bin/shotgun:19
fernyb commented 13 years ago

I believe this is because you are not using Ruby 1.9.2 Ruby 1.8.7 will not work. Please check your version by using the following command: "ruby -v" I should say "ruby 1.9.2"

joehoyle commented 13 years ago

Ahh that was the problem, thanks!

A note to anyone else, I had to run the Cappuccino from file://, I was trying to use Apache to server the web app - but it seems localhost to localhost:3000 is considering a violation of the cross origin policy.