はじめまして、
Cloud9でGosuのチュートリアルをしています。
https://github.com/gosu/gosu/wiki/Ruby-Tutorial
###前提・実現したいこと
サーバーエラーが出る。
SDLの初期化?
Mir Serverに接続できない?
Windowが表示されない。
###発生している問題・エラーメッセージ
lang
1 2Important: use ENV[PORT] as the port and ENV[IP] as the host in your scripts! 3 4/usr/local/rvm/gems/ruby-2.3.0/gems/gosu-0.12.1/lib/gosu/swig_patches.rb:20:in `initialize': Could not initialize SDL Video: Failed to connect to the Mir Server (RuntimeError) 5 from /usr/local/rvm/gems/ruby-2.3.0/gems/gosu-0.12.1/lib/gosu/swig_patches.rb:20:in `initialize' 6 from /home/ubuntu/workspace/gosu-examples.rb:29:in `initialize' 7 from /home/ubuntu/workspace/gosu-examples.rb:42:in `new' 8 from /home/ubuntu/workspace/gosu-examples.rb:42:in `<main>'
###該当のソースコード
lang
1require 'gosu' 2 3class Tutorial < Gosu::Window 4 def initialize 5 super 640, 480 6 self.caption = "Tutorial Game" 7 end 8 9 def update 10 # ... 11 end 12 13 def draw 14 # ... 15 end 16end 17 18Tutorial.new.show
###試したこと
bash
1$ gem list 2*** LOCAL GEMS *** 3 4actioncable (5.1.3) 5actionmailer (5.1.3) 6actionpack (5.1.3) 7actionview (5.1.3) 8activejob (5.1.3) 9activemodel (5.1.3) 10activerecord (5.1.3) 11activesupport (5.1.3) 12arel (8.0.0) 13bigdecimal (1.2.8) 14builder (3.2.3) 15bundler (1.15.3) 16bundler-unload (1.0.2) 17concurrent-ruby (1.0.5) 18did_you_mean (1.0.0) 19erubi (1.6.1) 20executable-hooks (1.3.2) 21gem-wrappers (1.2.7) 22globalid (0.4.0) 23gosu (0.12.1) 24i18n (0.8.6) 25io-console (0.4.5) 26json (1.8.3) 27loofah (2.0.3) 28mail (2.6.6) 29method_source (0.8.2) 30mime-types (3.1) 31mime-types-data (3.2016.0521) 32mini_portile2 (2.2.0) 33minitest (5.8.3) 34net-telnet (0.1.1) 35nio4r (2.1.0) 36nokogiri (1.8.0) 37power_assert (0.2.6) 38psych (2.0.17) 39rack (2.0.3) 40rack-test (0.6.3) 41rails (5.1.3) 42rails-dom-testing (2.0.3) 43rails-html-sanitizer (1.0.3) 44railties (5.1.3) 45rake (10.4.2) 46rdoc (4.2.1) 47rubygems-bundler (1.4.4) 48rvm (1.11.3.9) 49sprockets (3.7.1) 50sprockets-rails (3.2.0) 51test-unit (3.1.5) 52thor (0.19.4) 53thread_safe (0.3.6) 54tzinfo (1.2.3) 55websocket-driver (0.6.5) 56websocket-extensions (0.1.2) 57
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。