Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 渲染文本时出现绿色错误_Ruby_Memory_Graphics_Shoes - Fatal编程技术网

Ruby 渲染文本时出现绿色错误

Ruby 渲染文本时出现绿色错误,ruby,memory,graphics,shoes,Ruby,Memory,Graphics,Shoes,我最近安装了green_shoes gem,遇到了一个有趣的问题。我将运行示例应用程序sam.rb: require 'green_shoes' Shoes.app { para "welcome!" } 我得到了这样一个错误 /Users/me/.rvm/gems/ruby-2.2.0/gems/green_shoes-1.1.374/lib/shoes/app.rb:145:in `show_page': out of memory (NoMemoryError) from /Users

我最近安装了green_shoes gem,遇到了一个有趣的问题。我将运行示例应用程序sam.rb:

require 'green_shoes'

Shoes.app { para "welcome!" }
我得到了这样一个错误

/Users/me/.rvm/gems/ruby-2.2.0/gems/green_shoes-1.1.374/lib/shoes/app.rb:145:in `show_page': out of memory (NoMemoryError)
from /Users/me/.rvm/gems/ruby-2.2.0/gems/green_shoes-1.1.374/lib/shoes/app.rb:145:in `textblock'
from /Users/me/.rvm/gems/ruby-2.2.0/gems/green_shoes-1.1.374/lib/shoes/app.rb:168:in `para'
from /Users/me/.rvm/gems/ruby-2.2.0/gems/green_shoes-1.1.374/lib/shoes/style.rb:58:in `style'
from /Users/me/.rvm/gems/ruby-2.2.0/gems/green_shoes-1.1.374/lib/shoes/basic.rb:222:in `text='
from /Users/me/.rvm/gems/ruby-2.2.0/gems/green_shoes-1.1.374/lib/shoes/basic.rb:228:in `positioning'
from /Users/me/.rvm/gems/ruby-2.2.0/gems/green_shoes-1.1.374/lib/shoes/helper_methods.rb:179:in `block in contents_alignment'
from /Users/me/.rvm/gems/ruby-2.2.0/gems/green_shoes-1.1.374/lib/shoes/helper_methods.rb:168:in `each'
from /Users/me/.rvm/gems/ruby-2.2.0/gems/green_shoes-1.1.374/lib/shoes/helper_methods.rb:168:in `contents_alignment'
from /Users/me/.rvm/gems/ruby-2.2.0/gems/green_shoes-1.1.374/lib/shoes/helper_methods.rb:220:in `call_back_procs'
from /Users/me/.rvm/gems/ruby-2.2.0/gems/green_shoes-1.1.374/lib/shoes/main.rb:119:in `app'
from sam.rb:3:in `<main>'

感谢您使用这个漂亮的小GUI

当我更新一个依赖项时,我也遇到了各种各样的问题。 我想您的问题在于GTK gem,我使用了
gtk2(1.1.2 x86-mingw32)
cairo(1.10.2 x86-mingw32)


你的样品在这里很好用。不过,我在Ruby 1.9.3上,在2.X上,我没有绿色鞋子的经验。

遗憾的是,绿色鞋子目前没有维护,所以类似的错误不太可能得到修复。由于所有鞋款都有一定的兼容性,你可以试试运气或跑步

*** LOCAL GEMS ***

actionmailer (4.2.1, 4.2.0)
actionpack (4.2.1, 4.2.0)
actionview (4.2.1, 4.2.0)
activejob (4.2.1, 4.2.0)
activemodel (4.2.1, 4.2.0)
activerecord (4.2.1, 4.2.0)
activesupport (4.2.1, 4.2.0)
arel (6.0.0)
atk (2.2.4)
bigdecimal (1.2.7, 1.2.6)
binding_of_caller (0.7.2)
builder (3.2.2)
bundler (1.9.4, 1.8.4)
bundler-unload (1.0.2)
byebug (4.0.5, 3.5.1)
cairo (1.14.1)
climate_control (0.0.3)
cocaine (0.5.7)
coffee-rails (4.1.0)
coffee-script (2.4.1, 2.3.0)
coffee-script-source (1.9.1.1, 1.9.1)
columnize (0.9.0)
debug_inspector (0.0.2)
debugger-linecache (1.2.0)
diff-lcs (1.2.5)
erubis (2.7.0)
execjs (2.5.2, 2.4.0)
executable-hooks (1.3.2)
gdk_pixbuf2 (2.2.4)
gem-wrappers (1.2.7)
glib2 (2.2.4)
globalid (0.3.5, 0.3.3)
green_shoes (1.1.374)
gtk2 (2.2.4)
hike (2.1.3, 1.2.3)
i18n (0.7.0)
io-console (0.4.3)
jbuilder (2.2.13, 2.2.12, 2.2.11)
jquery-rails (4.0.3)
json (1.8.2, 1.8.1)
loofah (2.0.1)
mail (2.6.3)
mime-types (2.4.3)
mini_portile (0.6.2)
minitest (5.6.0, 5.5.1, 5.4.3)
multi_json (1.11.0)
nokogiri (1.6.6.2)
pango (2.2.4)
paperclip (4.2.1)
pkg-config (1.1.6)
power_assert (0.2.3, 0.2.2)
psych (2.0.13, 2.0.8)
rack (1.6.0)
rack-test (0.6.3)
rails (4.2.1, 4.2.0)
rails-deprecated_sanitizer (1.0.3)
rails-dom-testing (1.0.6, 1.0.5)
rails-html-sanitizer (1.0.2, 1.0.1)
railties (4.2.1, 4.2.0)
rake (10.4.2)
rdoc (4.2.0)
rspec (3.2.0)
rspec-core (3.2.3, 3.2.2, 2.14.8)
rspec-expectations (3.2.1, 3.2.0, 2.14.5)
rspec-mocks (3.2.1, 2.14.6)
rspec-support (3.2.2)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
sass (3.4.13)
sass-rails (5.0.3, 5.0.1)
sdoc (0.4.1)
slop (4.1.0, 3.6.0)
spring (1.3.4, 1.3.3)
sprockets (3.0.1, 2.12.3)
sprockets-rails (2.2.4)
sqlite3 (1.3.10)
test-unit (3.0.9, 3.0.8)
thor (0.19.1)
thread_safe (0.3.5, 0.3.4)
tilt (2.0.1, 1.4.1)
turbolinks (2.5.3)
tzinfo (1.2.2)
uglifier (2.7.1)
web-console (2.1.2, 2.1.1)