trogdoro / xiki

A shell console with GUI features
http://xiki.org
Other
3.76k stars 208 forks source link

Gem::LoadError and unintialized constant errors #62

Open PaulSD opened 10 years ago

PaulSD commented 10 years ago

I'm trying out xiki for the first time.

I'm using rvm with ruby 1.9.3-head.

I followed the git install instructions, and everything went fine: $ git clone git://github.com/trogdoro/xiki.git $ cd xiki $ # sudo gem install bundler <- already installed, so didn't run this $ bundle $ # ruby etc/command/copy_xiki_command_to.rb /usr/local/bin/xiki <- not needed, bundler installed a /usr/local/rvm/gems/ruby-1.9.3-head/bin/xiki file that is earlier in my path than /usr/local/bin/xiki anyway

But then: $ xiki /usr/local/rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find xiki (>= 0) amongst ...

Ok, fine, let's try this: $ bin/xiki ... works fine ... or: $ bundle exec xiki ... also works fine

So, moving on: $ bin/xiki web/start uninitialized constant Xiki::Menu::ErbHandler

fbehrens commented 10 years ago

run into the same issue

xiki web/start master [7b001ff] uninitialized constant Xiki::Menu::ErbHandler /Users/fb/code/open/xiki/lib/xiki/core/menu.rb:1062:in handlers' /Users/fb/code/open/xiki/lib/xiki/core/menu.rb:1068:inhandlers_order' /Users/fb/code/open/xiki/lib/xiki/core/menu.rb:1090:in handle' /Users/fb/code/open/xiki/lib/xiki/core/menu.rb:1003:inexpand_menufied' /Users/fb/code/open/xiki/lib/xiki/core/menu.rb:990:in expand' /Users/fb/code/open/xiki/lib/xiki/core/expander.rb:228:inblock in expand' /Users/fb/code/open/xiki/lib/xiki/core/expander.rb:226:in each' /Users/fb/code/open/xiki/lib/xiki/core/expander.rb:226:inexpand' /Users/fb/code/open/xiki/lib/xiki.rb:442:in []' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:45:inblock (3 levels) in run' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:20:in loop' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:20:inblock (2 levels) in run' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:19:in open' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:19:inblock in run' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:18:in open' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:18:inrun' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:68:in <top (required)>' /Users/fb/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/daemons-1.1.9/lib/daemons/application.rb:203:inload'

trogdoro commented 10 years ago

uninitialized constant Xiki::Menu::ErbHandler

Do a git pull and try again. I think that's fixed now.

--Craig

On Sun, Jul 28, 2013 at 5:58 AM, fbehrens notifications@github.com wrote:

run into the same issue

xiki web/start master [7b001ff]

uninitialized constant Xiki::Menu::ErbHandler /Users/fb/code/open/xiki/lib/xiki/core/menu.rb:1062:in handlers' /Users/fb/code/open/xiki/lib/xiki/core/menu.rb:1068:inhandlers_order' /Users/fb/code/open/xiki/lib/xiki/core/menu.rb:1090:in handle' /Users/fb/code/open/xiki/lib/xiki/core/menu.rb:1003:inexpand_menufied' /Users/fb/code/open/xiki/lib/xiki/core/menu.rb:990:in expand' /Users/fb/code/open/xiki/lib/xiki/core/expander.rb:228:inblock in expand' /Users/fb/code/open/xiki/lib/xiki/core/expander.rb:226:in each' /Users/fb/code/open/xiki/lib/xiki/core/expander.rb:226:inexpand' /Users/fb/code/open/xiki/lib/xiki.rb:442:in []' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:45:inblock (3 levels) in run' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:20:in loop' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:20:inblock (2 levels) in run' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:19:in open' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:19:inblock in run' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:18:in open' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:18:inrun' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:68:in <top (required)>' /Users/fb/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/daemons-1.1.9/lib/daemons/application.rb:203:inload'

— Reply to this email directly or view it on GitHub.

trogdoro commented 10 years ago

$ # ruby etc/command/copy_xiki_command_to.rb /usr/local/bin/xiki <- not needed, bundler installed a /usr/local/rvm/gems/ruby-1.9.3-head/bin/xiki

You should run it anyway. Then delete the 'xiki' binary that bundler created. That should fix it. (Also do a 'git pull' and 'bundle install' again if you don't have the erubis gem).

That's what this comment in the install steps was about (I should probably make it more conspicuous):

https://github.com/trogdoro/xiki/ | Troubleshooting: if you run "$ which xiki" and it doesn't show | /usr/local/bin/xiki or /usr/local/xiki, delete the 'xiki' file it shows. | (Normally it would be ignored but you probably have your gem bin | dirs at the beginning of your PATH.)

This is a temporary fix, obviously. At some point I'll try to get bundler to not install the binary (when installing from source). Anyone know how to do this? Note that the only thing in my Gemfile is...

/projects/xiki/Gemfile | source 'https://rubygems.org' | gemspec

I could wrap an "if...end" around this line, if I knew how to detect whether a bundle install is happening:

/projects/xiki/xiki.gemspec | # We're being run via "bundle install" (not via gem install) | if ! something | s.executables = ["xiki"] | end

--Craig

On Sat, Jul 27, 2013 at 10:20 AM, Paul Donohue notifications@github.com wrote:

I'm trying out xiki for the first time.

I'm using rvm with ruby 1.9.3-head.

I followed the git install instructions, and everything went fine: $ git clone git://github.com/trogdoro/xiki.git $ cd xiki $ # sudo gem install bundler <- already installed, so didn't run this $ bundle $ # ruby etc/command/copy_xiki_command_to.rb /usr/local/bin/xiki <- not needed, bundler installed a /usr/local/rvm/gems/ruby-1.9.3-head/bin/xiki file that is earlier in my path than /usr/local/bin/xiki anyway

But then: $ xiki /usr/local/rvm/rubies/ruby-1.9.3-head/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find xiki (>= 0) amongst ...

Ok, fine, let's try this: $ bin/xiki ... works fine ... or: $ bundle exec xiki ... also works fine

So, moving on: $ bin/xiki web/start uninitialized constant Xiki::Menu::ErbHandler

— Reply to this email directly or view it on GitHub.

trogdoro commented 10 years ago

Do a git pull and try again.

Oops, and then do a 'bundle install' again.

On Sun, Jul 28, 2013 at 6:34 PM, Craig Muth craig.muth@gmail.com wrote:

uninitialized constant Xiki::Menu::ErbHandler

Do a git pull and try again. I think that's fixed now.

--Craig

On Sun, Jul 28, 2013 at 5:58 AM, fbehrens notifications@github.com wrote:

run into the same issue

xiki web/start master [7b001ff]

uninitialized constant Xiki::Menu::ErbHandler /Users/fb/code/open/xiki/lib/xiki/core/menu.rb:1062:in handlers' /Users/fb/code/open/xiki/lib/xiki/core/menu.rb:1068:inhandlers_order' /Users/fb/code/open/xiki/lib/xiki/core/menu.rb:1090:in handle' /Users/fb/code/open/xiki/lib/xiki/core/menu.rb:1003:inexpand_menufied' /Users/fb/code/open/xiki/lib/xiki/core/menu.rb:990:in expand' /Users/fb/code/open/xiki/lib/xiki/core/expander.rb:228:inblock in expand' /Users/fb/code/open/xiki/lib/xiki/core/expander.rb:226:in each' /Users/fb/code/open/xiki/lib/xiki/core/expander.rb:226:inexpand' /Users/fb/code/open/xiki/lib/xiki.rb:442:in []' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:45:inblock (3 levels) in run' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:20:in loop' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:20:inblock (2 levels) in run' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:19:in open' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:19:inblock in run' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:18:in open' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:18:inrun' /Users/fb/code/open/xiki/etc/command/xiki_process.rb:68:in <top (required)>' /Users/fb/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/daemons-1.1.9/lib/daemons/application.rb:203:inload'

— Reply to this email directly or view it on GitHub.

PaulSD commented 10 years ago

ErbHandler issue is fixed now, thanks!

As for the bundler issue, there is a bug report about this, but it's not very helpful: https://github.com/bundler/bundler/issues/800

You could try: if ARGV[0] != 'bundler'

Or maybe just update the instructions to have the user run $ sudo rm which xiki after running bundle but before running the copy_xiki_command_to thing...

BTW, this command requires 'sudo' even if you are using rvm: $ ruby etc/command/copy_xiki_command_to.rb /usr/local/bin/xiki