maccman / bowline

Ruby/JS GUI and Binding framework (deprecated)
http://bowlineapp.com
MIT License
637 stars 32 forks source link

uninitialized constant Gem::VERSION #15

Open leemhenson opened 14 years ago

leemhenson commented 14 years ago

I'm running rvm'd ruby 1.9.1 on osx 10.5.8, and I've just tried to generate a new app and run it without making any changes of my own. e.g.

bowline-gen app myapp cd myapp bowline-bundle ./script/run

       uninitialized constant Gem::VERSION
/Users/leemhenson/src/github/myapp/vendor/gems/ruby/1.9.1/
environment.rb:39:in `eval'
       /Users/leemhenson/.bowline/libs/rubylib/1.9.1/rubygems/
specification.rb:443:in `initialize'
       (eval):3:in `new'
       (eval):3:in `'
       /Users/leemhenson/src/github/myapp/vendor/gems/ruby/1.9.1/
environment.rb:39:in `eval'
       /Users/leemhenson/src/github/myapp/vendor/gems/ruby/1.9.1/
environment.rb:39:in `'
       /Users/leemhenson/src/github/myapp/vendor/gems/ruby/1.9.1/
environment.rb:2:in `'
       /Users/leemhenson/src/github/myapp/vendor/gems/environment.rb:4:in
`require'
       /Users/leemhenson/src/github/myapp/vendor/gems/environment.rb:4:in
`'
       /Users/leemhenson/src/github/myapp/config/boot.rb:8:in `require'
       /Users/leemhenson/src/github/myapp/config/boot.rb:8:in `'
       /Users/leemhenson/src/github/myapp/script/init:2:in `require'
       /Users/leemhenson/src/github/myapp/script/init:2:in `'
2010-06-20 16:30:41.986 bowline-desktop[1127:180b] ***
_NSAutoreleaseNoPool(): Object 0xb492a0 of class WebView autoreleased
with no pool in place - just leaking
Stack: (0x96943f4f 0x96850432 0x95f0d696 0x95f033d1 0x95f0cf86 0xdea7f
0x7b688 0x2689b 0x189eae 0x189eeb 0x653cb 0xa8d4b 0xe6006 0x2228ac
0x223699 0x290db 0x24d5e)
2010-06-20 16:30:42.007 bowline-desktop[1127:180b] ***
_NSAutoreleaseNoPool(): Object 0xb43ac0 of class NSCFArray
autoreleased with no pool in place - just leaking
Stack: (0x96943f4f 0x96850432 0x941b3bf5 0x968970fb 0x95fc20d3
0x95f0d0e7 0xdea7f 0x7b688 0x2689b 0x189eae 0x189eeb 0x653cb 0xa8d4b
0xe6006 0x2228ac 0x223699 0x290db 0x24d5e)
2010-06-20 16:30:42.008 bowline-desktop[1127:180b] ***
_NSAutoreleaseNoPool(): Object 0xb54280 of class
__NSFastEnumerationEnumerator autoreleased with no pool in place -
just leaking
Stack: (0x96943f4f 0x96850432 0x95f14101 0x95fc23ff 0xd329d 0x653dd
0xa8d4b 0xe6006 0x2228ac 0x223699 0x290db 0x24d5e)
leemhenson commented 14 years ago

Sorry chief, I've been meaning to look into this a bit deeper but what with the World Cup, Wimbledon, cricket etc real life has been too distracting. I'll get some more info this weekend. :)

leemhenson commented 14 years ago

Ok, so something must be overwriting Gem::VERSION somewhere in my stack. If I change all the usages of Gem:VERSION to Gem::RubyGemsVersion in vendor/gems/ruby/1.9.1/specifications/*.gemspec, it no longer produces those errors.

Any ideas on where that overwriting might be happening? irb says:

~/src/github/myapp  $ irb
ruby-1.9.1-p378 > Gem::VERSION
 => "1.3.7" 

If I change all the gemspecs to use Gem::RubyGemsVersion and re-run ./script/run I get:

Illformed requirement [">= 3.0.0.beta"]
/Users/leemhenson/src/github/myapp/vendor/gems/ruby/1.9.1/environment.rb:53:in `eval'
    /Users/leemhenson/.bowline/libs/rubylib/1.9.1/rubygems/requirement.rb:75:in `block in initialize'
    /Users/leemhenson/.bowline/libs/rubylib/1.9.1/rubygems/requirement.rb:74:in `map'
    /Users/leemhenson/.bowline/libs/rubylib/1.9.1/rubygems/requirement.rb:74:in `initialize'
    /Users/leemhenson/.bowline/libs/rubylib/1.9.1/rubygems/requirement.rb:45:in `new'
    /Users/leemhenson/.bowline/libs/rubylib/1.9.1/rubygems/requirement.rb:45:in `create'
    /Users/leemhenson/.bowline/libs/rubylib/1.9.1/rubygems/dependency.rb:59:in `initialize'
    /Users/leemhenson/.bowline/libs/rubylib/1.9.1/rubygems/specification.rb:902:in `new'
    /Users/leemhenson/.bowline/libs/rubylib/1.9.1/rubygems/specification.rb:902:in `add_dependency_with_type'
    /Users/leemhenson/.bowline/libs/rubylib/1.9.1/rubygems/specification.rb:565:in `add_runtime_dependency'
    (eval):25:in `block in '
    /Users/leemhenson/.bowline/libs/rubylib/1.9.1/rubygems/specification.rb:443:in `initialize'
    (eval):3:in `new'
    (eval):3:in `'
    /Users/leemhenson/src/github/myapp/vendor/gems/ruby/1.9.1/environment.rb:53:in `eval'
    /Users/leemhenson/src/github/myapp/vendor/gems/ruby/1.9.1/environment.rb:53:in `'
    /Users/leemhenson/src/github/myapp/vendor/gems/ruby/1.9.1/environment.rb:2:in `'
    /Users/leemhenson/src/github/myapp/vendor/gems/environment.rb:4:in `require'
    /Users/leemhenson/src/github/myapp/vendor/gems/environment.rb:4:in `'
    /Users/leemhenson/src/github/myapp/config/boot.rb:8:in `require'
    /Users/leemhenson/src/github/myapp/config/boot.rb:8:in `'
    /Users/leemhenson/src/github/myapp/script/init:2:in `require'
    /Users/leemhenson/src/github/myapp/script/init:2:in `'
2010-06-26 15:28:30.012 bowline-desktop[1668:180b] *** _NSAutoreleaseNoPool(): Object 0xb493c0 of class WebView autoreleased with no pool in place - just leaking
Stack: (0x96943f4f 0x96850432 0x95f0d696 0x95f033d1 0x95f0cf86 0xdea7f 0x7b688 0x2689b 0x189eae 0x189eeb 0x653cb 0xa8d4b 0xe6006 0x2228ac 0x223699 0x290db 0x24d5e)
2010-06-26 15:28:30.014 bowline-desktop[1668:180b] *** _NSAutoreleaseNoPool(): Object 0xb46a60 of class NSCFArray autoreleased with no pool in place - just leaking
Stack: (0x96943f4f 0x96850432 0x941b3bf5 0x968970fb 0x95fc20d3 0x95f0d0e7 0xdea7f 0x7b688 0x2689b 0x189eae 0x189eeb 0x653cb 0xa8d4b 0xe6006 0x2228ac 0x223699 0x290db 0x24d5e)
2010-06-26 15:28:30.016 bowline-desktop[1668:180b] *** _NSAutoreleaseNoPool(): Object 0xb485d0 of class __NSFastEnumerationEnumerator autoreleased with no pool in place - just leaking
Stack: (0x96943f4f 0x96850432 0x95f14101 0x95fc23ff 0xd329d 0x653dd 0xa8d4b 0xe6006 0x2228ac 0x223699 0x290db 0x24d5e)
prisoner commented 14 years ago

I have the same problem.

niklas commented 14 years ago

happens on Ubuntu 10.04, too

zzak commented 14 years ago

I'm also receiving this bug. Ubuntu 10.10 Ruby 1.9.1-p378 (rvm) Gems 1.3.7 bowline 0.9.3 (gem version)

chriskottom commented 14 years ago

I'm running the same environment as the previous report, and I have the same issue.

chriskottom commented 13 years ago

I was finally able to get this working by replacing Gem::VERSION with Gem::RubyGemsVersion as described above by leemhenson and then doing further replacements that fixed the fact that some of the original gemspecs were using special version numbers, e.g. "3.0.0.beta4". Offending specifications were:

This is simply a workaround. The real fix will be to ensure that the gemspecs can be run through eval without problems. (Also need to figure out what's causing the initial issue relating to Gem::VERSION.) I'll take a crack at finding a more permanent fix after I get a little deeper into Bundler, but this should be enough to help folks get up and running until then.

datnt commented 13 years ago

Bowline is not good enough for playing with it.

mitfik commented 13 years ago

I found problem of this bug. It is problem with rubygems version when You run script/run You download lib.zip with old rubygems version (1.3.1) where VERSION is not defined

The question is why we can't use all libs from our system but we need download all from some servers?

Can You explain how I can change it ? I would like to use all libs from my rvm directories

Ok i have done it. SOLUTION:

recompile bowline-desktop add to .bowline/lib new version of ruby

and all works great :)

rafa2000 commented 13 years ago

mitfik could you explain your solution a little better.

mitfik commented 13 years ago

Hi,

How do you recompile bowline-desktop?

download latest version from git, and compile it (ruby2make, make etc...) after that copy bowline-desktop file to Your ~/.bowline directory or You can download mine from http://www.sendspace.com/file/1836fp , I had compile it also on ubuntu 10.04 so it should works also on Your box.

Where is .bowline/lib?

is in Your home directories ~/.bowline

You need copy all ruby lib files (You can take mine from this link it is 1.9.1 http://www.sendspace.com/file/3lmev2 ) in to ~/.bowline/libs/rubylib/

and that's it, if You will have some problem give me know.

regards