Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Can't run on Windows because of dependency on LibYaml? #121

Closed
dsample opened this Issue · 8 comments

5 participants

@dsample

I'm trying to use Geminabox on a Windows server and wondered if there was a way to avoid/remove the need for a dependency on the Psych Gem, and therefore LibYaml & Python.

At the moment we set Geminabox as per the installation instructions, and running rackup seems to work fine (WEBrick starts up ok) but it doesn't create all of the 'quick' directory structure and Marshal files. When run with rackup -d we see the following error before the start of WEBrick:

$ rackup -d
nil
Exception `LoadError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - cannot load such file -- geminabox
Exception `NoMethodError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1489 - undefined method `to_ary' for #<Gem::Specification name=tilt version=1.3.6>
Exception `NoMethodError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1489 - undefined method `to_ary' for #<Gem::Specification name=tilt version=1.4.1>

... lots of lines like the one above

Exception `Gem::LoadError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247 - Could not find psych (>= 1.2.1, ~> 1.2) amongst [actionmailer-3.2.13, actionpack-3.2.13, activemodel-3.2.13, activerecord-3.2.13, activeresource-3.2.13, activesupport-3.2.13, albacore-0.3.4, arel-3.0.2, bigdecimal-1.1.0, builder-3.1.4, builder-3.0.4, bundler-1.2.4, chunky_png-1.2.8, closure-compiler-1.1.8, coffee-rails-3.2.2, coffee-script-2.2.0, coffee-script-source-1.6.2, compass-0.12.2, diff-lcs-1.2.4, erubis-Exception `NameError' at c:/Ruby193/lib/ruby/1.9.1/psych/core_ext.rb:16 - method `to_yaml' not defined in Object

...

I can't find where the dependency on Psych is being introduced, so was hoping someone could point me in the right direction if there is the possibility of removing it or avoiding it, rather than just installing Python and LibYaml.

@mtscout6

@dsample I just did some work yesterday and got things working on windows. I didn't see any problems with LibYaml. Do you mind checking out pull request #129 and let me know if that got everything you needed for things to work?

@rybadger

I was able to fix the error "cannot load such file -- geminabox" but creating a gemfile.

source 'https://rubygems.org'
gem "geminabox", "~> 0.11.0"

@reggieb
Owner

@dsample can you try the latest release (0.11.1) and see if this fixes your issues.

@mtscout6

@reggieb I just tried 0.11.1 on windows and it failed due to a Zlib::BufError. This error is what I fixed in pull request #129.

@mtscout6

@reggieb I just attempted to merge the latest master into pull request #129, but it doesn't look like the merge was clean. I don't have the time at the moment to dive into the merge conflict, but when I'm able to come up for some air at work, I'll see what I can do.

@dsample

I've just updated to 0.11.1 and I still get errors that won't allow it to start, complaining mainly about the psych gem still. I got psych 2.0.1 installed but it's asking for ~> 1.2 and that version won't install because of LibYaml.

It still fails silently (but doesn't allow uploading gems) if you don't use rackup -d.

My config.ru now looks like:

require "rubygems"
require "rubygems/user_interaction"
require "geminabox"

Geminabox.data = "g:/geminabox/data"
run Geminabox

Sorry about the huge paste

$ rackup -d --server thin
"thin"
Exception `LoadError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_req
uire.rb:36 - cannot load such file -- thin
Exception `LoadError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_req
uire.rb:36 - cannot load such file -- geminabox
Exception `Gem::LoadError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/depen
dency.rb:247 - Could not find psych (>= 1.2.1, ~> 1.2) amongst [bigdecimal-1.1.0
, builder-3.2.2, daemons-1.1.9, eventmachine-1.0.3, geminabox-0.11.1, geminabox-
0.10.1, httpclient-2.3.3, io-console-0.3, json-1.5.5, minitest-2.5.1, nesty-1.0.
2, psych-2.0.1, rack-1.5.2, rack-protection-1.5.0, rake-0.9.2.2, rdoc-3.9.5, sin
atra-1.4.2, thin-1.6.0, tilt-1.4.1]
Exception `NameError' at c:/Ruby193/lib/ruby/1.9.1/psych/core_ext.rb:16 - method
 `to_yaml' not defined in Object
Exception `NameError' at c:/Ruby193/lib/ruby/1.9.1/psych/core_ext.rb:29 - method
 `yaml_as' not defined in Module
Exception `NameError' at c:/Ruby193/lib/ruby/1.9.1/psych/deprecated.rb:79 - unde
fined method `to_yaml_properties' for class `Object'
Exception `NameError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/syck_hack.
rb:20 - constant Psych::Syck not defined
Exception `NameError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/syck_hack.
rb:42 - method `to_s' not defined in Syck::DefaultKey
Exception `LoadError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_req
uire.rb:36 - cannot load such file -- xml/parser
Exception `LoadError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_req
uire.rb:63 - cannot load such file -- xml/parser
Exception `LoadError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_req
uire.rb:36 - cannot load such file -- xmlparser
Exception `LoadError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_req
uire.rb:63 - cannot load such file -- xmlparser
Exception `LoadError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_req
uire.rb:63 - cannot load such file -- xmlparser
Exception `LoadError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_req
uire.rb:36 - cannot load such file -- xmlscan/scanner
Exception `LoadError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_req
uire.rb:63 - cannot load such file -- xmlscan/scanner
Exception `LoadError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_req
uire.rb:63 - cannot load such file -- xmlscan/scanner
#<Rack::ContentLength:0x38ab5b0
 @app=
  #<Rack::Chunked:0x38ab5e0
   @app=
    #<Rack::CommonLogger:0x38ab610
     @app=
      #<Rack::ShowExceptions:0x3872250
       @app=#<Rack::Lint:0x3872280 @app=Geminabox, @content_length=nil>,
       @template=
        #<ERB:0x3872238
         @enc=#<Encoding:US-ASCII>,
         @filename=nil,
         @safe_level=nil,
         @src=
          "#coding:US-ASCII\n_erbout = ''; _erbout.concat \"<!DOCTYPE HTML PUBLI
C \\\"-//W3C//DTD HTML 4.01 Transitional//EN\\\" \\\"http://www.w3.org/TR/html4/
loose.dtd\\\">\\n<html lang=\\\"en\\\">\\n<head>\\n  <meta http-equiv=\\\"conten
t-type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n  <meta name=\\\"robots
\\\" content=\\\"NONE,NOARCHIVE\\\" />\\n  <title>\"\n\n\n\n\n; _erbout.concat((
h exception.class ).to_s); _erbout.concat \" at \"; _erbout.concat((h path ).to_
s); _erbout.concat \"</title>\\n  <style type=\\\"text/css\\\">\\n    html * { p
adding:0; margin:0; }\\n    body * { padding:10px 20px; }\\n    body * * { paddi
ng:0; }\\n    body { font:small sans-serif; }\\n    body>div { border-bottom:1px
 solid #ddd; }\\n    h1 { font-weight:normal; }\\n    h2 { margin-bottom:.8em; }
\\n    h2 span { font-size:80%; color:#666; font-weight:normal; }\\n    h3 { mar
gin:1em 0 .5em 0; }\\n    h4 { margin:0 0 .5em 0; font-weight: normal; }\\n    t
able {\\n        border:1px solid #ccc; border-collapse: collapse; background:wh
ite; }\\n    tbody td, tbody th { vertical-align:top; padding:2px 3px; }\\n    t
head th {\\n        padding:1px 6px 1px 3px; background:#fefefe; text-align:left
;\\n        font-weight:normal; font-size:11px; border:1px solid #ddd; }\\n    t
body th { text-align:right; color:#666; padding-right:.5em; }\\n    table.vars {
 margin:5px 0 2px 40px; }\\n    table.vars td, table.req td { font-family:monosp
ace; }\\n    table td.code { width:100%;}\\n    table td.code div { overflow:hid
den; }\\n    table.source th { color:#666; }\\n    table.source td {\\n        f
ont-family:monospace; white-space:pre; border-bottom:1px solid #eee; }\\n    ul.
traceback { list-style-type:none; }\\n    ul.traceback li.frame { margin-bottom:
1em; }\\n    div.context { margin: 10px 0; }\\n    div.context ol {\\n        pa
dding-left:30px; margin:0 10px; list-style-position: inside; }\\n    div.context
 ol li {\\n        font-family:monospace; white-space:pre; color:#666; cursor:po
inter; }\\n    div.context ol.context-line li { color:black; background-color:#c
cc; }\\n    div.context ol.context-line li span { float: right; }\\n    div.comm
ands { margin-left: 40px; }\\n    div.commands a { color:black; text-decoration:
none; }\\n    #summary { background: #ffc; }\\n    #summary h2 { font-weight: no
rmal; color: #666; }\\n    #summary ul#quicklinks { list-style-type: none; margi
n-bottom: 2em; }\\n    #summary ul#quicklinks li { float: left; padding: 0 1em;
}\\n    #summary ul#quicklinks>li+li { border-left: 1px #666 solid; }\\n    #exp
lanation { background:#eee; }\\n    #template, #template-not-exist { background:
#f6f6f6; }\\n    #template-not-exist ul { margin: 0 0 0 20px; }\\n    #traceback
 { background:#eee; }\\n    #requestinfo { background:#f6f6f6; padding-left:120p
x; }\\n    #summary table { border:none; background:transparent; }\\n    #reques
tinfo h2, #requestinfo h3 { position:relative; margin-left:-100px; }\\n    #requ
estinfo h3 { margin-bottom:-1em; }\\n    .error { background: #ffc; }\\n    .spe
cific { color:#cc3300; font-weight:bold; }\\n  </style>\\n  <script type=\\\"tex
t/javascript\\\">\\n  //<!--\\n    function getElementsByClassName(oElm, strTagN
ame, strClassName){\\n        // Written by Jonathan Snook, http://www.snook.ca/
jon;\\n        // Add-ons by Robert Nyman, http://www.robertnyman.com\\n
var arrElements = (strTagName == \\\"*\\\" && document.all)? document.all :\\n
      oElm.getElementsByTagName(strTagName);\\n        var arrReturnElements = n
ew Array();\\n        strClassName = strClassName.replace(/\\\\-/g, \\\"\\\\\\\\
-\\\");\\n        var oRegExp = new RegExp(\\\"(^|\\\\\\\\s)\\\" + strClassName
+ \\\"(\\\\\\\\s|$$)\\\");\\n        var oElement;\\n        for(var i=0; i<arrE
lements.length; i++){\\n            oElement = arrElements[i];\\n            if(
oRegExp.test(oElement.className)){\\n                arrReturnElements.push(oEle
ment);\\n            }\\n        }\\n        return (arrReturnElements)\\n    }\
\n    function hideAll(elems) {\\n      for (var e = 0; e < elems.length; e++) {
\\n        elems[e].style.display = 'none';\\n      }\\n    }\\n    window.onloa
d = function() {\\n      hideAll(getElementsByClassName(document, 'table', 'vars
'));\\n      hideAll(getElementsByClassName(document, 'ol', 'pre-context'));\\n
     hideAll(getElementsByClassName(document, 'ol', 'post-context'));\\n    }\\n
    function toggle() {\\n      for (var i = 0; i < arguments.length; i++) {\\n
       var e = document.getElementById(arguments[i]);\\n        if (e) {\\n
     e.style.display = e.style.display == 'none' ? 'block' : 'none';\\n        }
\\n      }\\n      return false;\\n    }\\n    function varToggle(link, id) {\\n
      toggle('v' + id);\\n      var s = link.getElementsByTagName('span')[0];\\n
      var uarr = String.fromCharCode(0x25b6);\\n      var darr = String.fromChar
Code(0x25bc);\\n      s.innerHTML = s.innerHTML == uarr ? darr : uarr;\\n      r
eturn false;\\n    }\\n    //-->\\n  </script>\\n</head>\\n<body>\\n\\n<div id=\
\\"summary\\\">\\n  <h1>\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n; _e
rbout.concat((h exception.class ).to_s); _erbout.concat \" at \"; _erbout.concat
((h path ).to_s); _erbout.concat \"</h1>\\n  <h2>\"\n; _erbout.concat((h excepti
on.message ).to_s); _erbout.concat \"</h2>\\n  <table><tr>\\n    <th>Ruby</th>\\
n    <td>\\n\"\n\n\n\n;  if first = frames.first ; _erbout.concat \"\\n      <co
de>\"\n; _erbout.concat((h first.filename ).to_s); _erbout.concat \"</code>: in
<code>\"; _erbout.concat((h first.function ).to_s); _erbout.concat \"</code>, li
ne \"; _erbout.concat((h frames.first.lineno ).to_s); _erbout.concat \"\\n\"\n;
 else ; _erbout.concat \"\\n      unknown location\\n\"\n\n;  end ; _erbout.conc
at \"\\n    </td>\\n  </tr><tr>\\n    <th>Web</th>\\n    <td><code>\"\n\n\n\n; _
erbout.concat((h req.request_method ).to_s); _erbout.concat \" \"; _erbout.conca
t((h(req.host + path)).to_s); _erbout.concat \"</code></td>\\n  </tr></table>\\n
\\n  <h3>Jump to:</h3>\\n  <ul id=\\\"quicklinks\\\">\\n    <li><a href=\\\"#get
-info\\\">GET</a></li>\\n    <li><a href=\\\"#post-info\\\">POST</a></li>\\n
<li><a href=\\\"#cookie-info\\\">Cookies</a></li>\\n    <li><a href=\\\"#env-inf
o\\\">ENV</a></li>\\n  </ul>\\n</div>\\n\\n<div id=\\\"traceback\\\">\\n  <h2>Tr
aceback <span>(innermost first)</span></h2>\\n  <ul class=\\\"traceback\\\">\\n\
"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n;  frames.each { |frame| ; _erbout.concat \"\\n
    <li class=\\\"frame\\\">\\n        <code>\"\n\n; _erbout.concat((h frame.fil
ename ).to_s); _erbout.concat \"</code>: in <code>\"; _erbout.concat((h frame.fu
nction ).to_s); _erbout.concat \"</code>\\n\\n          \"\n\n;  if frame.contex
t_line ; _erbout.concat \"\\n          <div class=\\\"context\\\" id=\\\"c\"\n;
_erbout.concat((h frame.object_id ).to_s); _erbout.concat \"\\\">\\n
  \"\n;  if frame.pre_context ; _erbout.concat \"\\n              <ol start=\\\"
\"\n; _erbout.concat((h frame.pre_context_lineno+1 ).to_s); _erbout.concat \"\\\
" class=\\\"pre-context\\\" id=\\\"pre\"; _erbout.concat((h frame.object_id ).to
_s); _erbout.concat \"\\\">\\n                \"\n;  frame.pre_context.each { |l
ine| ; _erbout.concat \"\\n                <li onclick=\\\"toggle('pre\"\n; _erb
out.concat((h frame.object_id ).to_s); _erbout.concat \"', 'post\"; _erbout.conc
at((h frame.object_id ).to_s); _erbout.concat \"')\\\">\"; _erbout.concat((h lin
e ).to_s); _erbout.concat \"</li>\\n                \"\n;  } ; _erbout.concat \"
\\n              </ol>\\n              \"\n\n;  end ; _erbout.concat \"\\n\\n
         <ol start=\\\"\"\n\n; _erbout.concat((h frame.lineno ).to_s); _erbout.c
oncat \"\\\" class=\\\"context-line\\\">\\n              <li onclick=\\\"toggle(
'pre\"\n; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"', 'post\"
; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"')\\\">\"; _erbout
.concat((h frame.context_line ).to_s); _erbout.concat \"<span>...</span></li></o
l>\\n\\n              \"\n\n;  if frame.post_context ; _erbout.concat \"\\n
         <ol start='\"\n; _erbout.concat((h frame.lineno+1 ).to_s); _erbout.conc
at \"' class=\\\"post-context\\\" id=\\\"post\"; _erbout.concat((h frame.object_
id ).to_s); _erbout.concat \"\\\">\\n                \"\n;  frame.post_context.e
ach { |line| ; _erbout.concat \"\\n                <li onclick=\\\"toggle('pre\"
\n; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"', 'post\"; _erb
out.concat((h frame.object_id ).to_s); _erbout.concat \"')\\\">\"; _erbout.conca
t((h line ).to_s); _erbout.concat \"</li>\\n                \"\n;  } ; _erbout.c
oncat \"\\n              </ol>\\n              \"\n\n;  end ; _erbout.concat \"\
\n          </div>\\n          \"\n\n;  end ; _erbout.concat \"\\n      </li>\\n
\"\n\n;  } ; _erbout.concat \"\\n  </ul>\\n</div>\\n\\n<div id=\\\"requestinfo\\
\">\\n  <h2>Request information</h2>\\n\\n  <h3 id=\\\"get-info\\\">GET</h3>\\n
 \"\n\n\n\n\n\n\n\n;  if req.GET and not req.GET.empty? ; _erbout.concat \"\\n
  <table class=\\\"req\\\">\\n      <thead>\\n        <tr>\\n          <th>Varia
ble</th>\\n          <th>Value</th>\\n        </tr>\\n      </thead>\\n      <tb
ody>\\n          \"\n\n\n\n\n\n\n\n\n;  req.GET.sort_by { |k, v| k.to_s }.each {
 |key, val| ; _erbout.concat \"\\n          <tr>\\n            <td>\"\n\n; _erbo
ut.concat((h key ).to_s); _erbout.concat \"</td>\\n            <td class=\\\"cod
e\\\"><div>\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \"</div><
/td>\\n          </tr>\\n          \"\n\n;  } ; _erbout.concat \"\\n      </tbod
y>\\n    </table>\\n  \"\n\n\n;  else ; _erbout.concat \"\\n    <p>No GET data.<
/p>\\n  \"\n\n;  end ; _erbout.concat \"\\n\\n  <h3 id=\\\"post-info\\\">POST</h
3>\\n  \"\n\n\n;  if req.POST and not req.POST.empty? ; _erbout.concat \"\\n
<table class=\\\"req\\\">\\n      <thead>\\n        <tr>\\n          <th>Variabl
e</th>\\n          <th>Value</th>\\n        </tr>\\n      </thead>\\n      <tbod
y>\\n          \"\n\n\n\n\n\n\n\n\n;  req.POST.sort_by { |k, v| k.to_s }.each {
|key, val| ; _erbout.concat \"\\n          <tr>\\n            <td>\"\n\n; _erbou
t.concat((h key ).to_s); _erbout.concat \"</td>\\n            <td class=\\\"code
\\\"><div>\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \"</div></
td>\\n          </tr>\\n          \"\n\n;  } ; _erbout.concat \"\\n      </tbody
>\\n    </table>\\n  \"\n\n\n;  else ; _erbout.concat \"\\n    <p>No POST data.<
/p>\\n  \"\n\n;  end ; _erbout.concat \"\\n\\n\\n  <h3 id=\\\"cookie-info\\\">CO
OKIES</h3>\\n  \"\n\n\n\n;  unless req.cookies.empty? ; _erbout.concat \"\\n
<table class=\\\"req\\\">\\n      <thead>\\n        <tr>\\n          <th>Variabl
e</th>\\n          <th>Value</th>\\n        </tr>\\n      </thead>\\n      <tbod
y>\\n        \"\n\n\n\n\n\n\n\n\n;  req.cookies.each { |key, val| ; _erbout.conc
at \"\\n          <tr>\\n            <td>\"\n\n; _erbout.concat((h key ).to_s);
_erbout.concat \"</td>\\n            <td class=\\\"code\\\"><div>\"\n; _erbout.c
oncat((h val.inspect ).to_s); _erbout.concat \"</div></td>\\n          </tr>\\n
       \"\n\n;  } ; _erbout.concat \"\\n      </tbody>\\n    </table>\\n  \"\n\n
\n;  else ; _erbout.concat \"\\n    <p>No cookie data.</p>\\n  \"\n\n;  end ; _e
rbout.concat \"\\n\\n  <h3 id=\\\"env-info\\\">Rack ENV</h3>\\n    <table class=
\\\"req\\\">\\n      <thead>\\n        <tr>\\n          <th>Variable</th>\\n
      <th>Value</th>\\n        </tr>\\n      </thead>\\n      <tbody>\\n
  \"\n\n\n\n\n\n\n\n\n\n\n;  env.sort_by { |k, v| k.to_s }.each { |key, val| ; _
erbout.concat \"\\n          <tr>\\n            <td>\"\n\n; _erbout.concat((h ke
y ).to_s); _erbout.concat \"</td>\\n            <td class=\\\"code\\\"><div>\"\n
; _erbout.concat((h val ).to_s); _erbout.concat \"</div></td>\\n          </tr>\
\n          \"\n\n;  } ; _erbout.concat \"\\n      </tbody>\\n    </table>\\n\\n
</div>\\n\\n<div id=\\\"explanation\\\">\\n  <p>\\n    You're seeing this error
because you use <code>Rack::ShowExceptions</code>.\\n  </p>\\n</div>\\n\\n</body
>\\n</html>\\n\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n; _erbout.force_encoding(__ENCODING_
_)">>,
     @logger=#<IO:<STDERR>>>>>
Geminabox
@clanpotshake

I'm having the same error as dsample's last post on Unix with geminabox 0.12.1, ruby 1.9.3, gem 1.8.24.

I had to implement myself this fix: cswilliams@2a1bc5e
to get past the error in the initial post.

Any fix for this in sight? Am I behind on versions?

@reggieb
Owner

I've just released 0.12.4. I believe this version includes a number of fixes (including cswilliams@2a1bc5e) that should make using Geminabox on Windows more practical.

Geminabox has changed a lot since this issue was first raised. I believe most of the issues have now been addressed, so I'm going to close this issue. If you strongly disagree with this decision, please feel free to reopen and argue your point.

If on the other hand, you find that Geminabox will still not work for you on Windows, please raise new issues that describe the current problem rather that adding to this issue.

@reggieb reggieb closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.