Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Korundum4 not found on Linux Mint 17 MATE #17

Open
alexbottoni opened this issue Feb 24, 2015 · 12 comments
Open

Korundum4 not found on Linux Mint 17 MATE #17

alexbottoni opened this issue Feb 24, 2015 · 12 comments

Comments

@alexbottoni
Copy link

My system:

  • Linux Mint 17 (MATE GTK2)
  • Ruby 2.2.0 installed/managed via RVM (I tried other Rubies, as well, without success)
  • Both Qt 4 and Qt 5 installed via APT
  • Both Korundum and Korundum4 installed via Synaptic (APT)
  • Many other Qt- , KDE- and Ruby-related libraries installed

My CL:

$ gem install ruber # No error messages
$ ruber
$ /home/alex/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- korundum4 (LoadError)

Any suggestion?

@stcrocco
Copy link
Owner

Excerpts from alexbottoni's message of 2015-02-24 13:43:37 +0100:

My system:

  • Linux Mint 17 (MATE GTK2)
  • Ruby 2.2.0 installed/managed via RVM (I tried other Rubies, as well, without success)
  • Both Qt 4 and Qt 5 installed via APT
  • Both Korundum and Korundum4 installed via Synaptic (APT)
  • Many other Qt- , KDE- and Ruby-related libraries installed

My CL:

$ gem install ruber # No error messages
$ ruber
$ /home/alex/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- korundum4 (LoadError)

Any suggestion?

I've little experience with rvm but I don't think that you can use a system-wide
install of konrundum (such as synaptic provides) with a gem installed using rvm.
This is because rvm-installed rubies look for files to require in paths under
the .rvm directory (as you can see from the error message you posted), while
most likely synaptics installs korundum in the ruby directory under /usr/lib or
something similar. I think you should install qtruby and korundum manually from
rvm. As I don't usually use rvm, I don't know exactly how to proceed. It should
be something like this:

You'll need to

  • download qtruby and korundum from the kde site, then, for each of them:
  • unpack the files and go to the corresponding directory
  • mkdir build
  • cd build
  • cmake ..
  • ccmake .
  • in the UI you get from ccmake, change the CMAKE_INSTALL_PREFIX path to point
    to the correct installation path under .rvm

Note that currently ruber doesn't work correctly with ruby-2.0 or above, as its
YAML files use a syntax for symbols which isn't supported with the YAML library
provied by ruby 2.0 and above. You're advised to run it using ruby 1.9.3.

Stefano

@alexbottoni
Copy link
Author

Il 24/02/2015 15:03, stcrocco ha scritto:
Hi Stefano,
thanks for your quick reply.

I've little experience with rvm but I don't think that you can use a
system-wide
install of konrundum (such as synaptic provides) with a gem installed
using rvm.

You are right: it is not possible to use a system-wide installation of
Korundum with a RVM-managed Gemset.

Anyway, you do not have to install Korundum by hand. RVM has a specific
command for this:

$ rvm use system

I used this command and I succeded to get over the mentioned problem.
Unfortunately, now Ruber is complaining against another missing dependency:

$ ruber
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot
load such file -- facets/kernel/require_relative (LoadError)

Please note that facets is correctly installed:

$ sudo gem install ruber
[sudo] password for alex:
Fetching: facets-3.0.0.gem (100%)
Fetching: dictionary-1.0.0.gem (100%)
Fetching: rak-1.4.gem (100%)
Fetching: outsider-0.0.2.gem (100%)
If you have other versions of this gem installed, you're advised to
remove them
before installing other gems.

If you don't do this, each version of Outsider you have installed will
install
or remove the files specified by gems you install or uninstall. This
shouldn't
cause problems, but, to be on the safe side, it's better avoided.
Fetching: ruber-0.0.10.gem (100%)
Successfully installed facets-3.0.0
Successfully installed dictionary-1.0.0
Successfully installed rak-1.4
Successfully installed outsider-0.0.2
Successfully installed ruber-0.0.10
5 gems installed

Looks like the problem is related to the fact that Ruber is looking for
Ruby 1.9.1 while my system-wide installation is actually 1.9.3. This
happens because of a naming difference between Ruby branch and Ruby
version in Debian Packages. Here what is stated in the description
message of Ruby1.9.1 package in APT:

In the name of this package, 1.9.1' indicates the Ruby library compatibility version. This package currently provides the1.9.3'
branch of Ruby, which is compatible with the `1.9.1' branch.

And, in fact, Ruby see itself as 1.9.3 (even if I installed 1.9.1):

$ ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [i686-linux]

Any idea?

BTW: Do you speak italian? If we have to communicate privately by email,
maybe we can use our mother language.

Alessandro Bottoni
Website: http://www.alessandrobottoni.it/

"A black cat crossing your path signifies that the animal is going
somewhere."
-- Groucho Marx

@stcrocco
Copy link
Owner

Excerpts from alexbottoni's message of 2015-02-24 16:22:07 +0100:

Il 24/02/2015 15:03, stcrocco ha scritto:
Hi Stefano,
thanks for your quick reply.

I've little experience with rvm but I don't think that you can use a
system-wide
install of konrundum (such as synaptic provides) with a gem installed
using rvm.

You are right: it is not possible to use a system-wide installation of
Korundum with a RVM-managed Gemset.

Anyway, you do not have to install Korundum by hand. RVM has a specific
command for this:

$ rvm use system

I used this command and I succeded to get over the mentioned problem.
Unfortunately, now Ruber is complaining against another missing dependency:

$ ruber
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot
load such file -- facets/kernel/require_relative (LoadError)

Please note that facets is correctly installed:

$ sudo gem install ruber
[sudo] password for alex:
Fetching: facets-3.0.0.gem (100%)
Fetching: dictionary-1.0.0.gem (100%)
Fetching: rak-1.4.gem (100%)
Fetching: outsider-0.0.2.gem (100%)
If you have other versions of this gem installed, you're advised to
remove them
before installing other gems.

If you don't do this, each version of Outsider you have installed will
install
or remove the files specified by gems you install or uninstall. This
shouldn't
cause problems, but, to be on the safe side, it's better avoided.
Fetching: ruber-0.0.10.gem (100%)
Successfully installed facets-3.0.0
Successfully installed dictionary-1.0.0
Successfully installed rak-1.4
Successfully installed outsider-0.0.2
Successfully installed ruber-0.0.10
5 gems installed

Looks like the problem is related to the fact that Ruber is looking for
Ruby 1.9.1 while my system-wide installation is actually 1.9.3. This
happens because of a naming difference between Ruby branch and Ruby
version in Debian Packages. Here what is stated in the description
message of Ruby1.9.1 package in APT:

In the name of this package, 1.9.1' indicates the Ruby library compatibility version. This package currently provides the1.9.3'
branch of Ruby, which is compatible with the `1.9.1' branch.

And, in fact, Ruby see itself as 1.9.3 (even if I installed 1.9.1):

$ ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [i686-linux]

Any idea?

BTW: Do you speak italian? If we have to communicate privately by email,
maybe we can use our mother language.

It seems that facets 3.0.0 has removed kernel/require_relative, most likely
because it's already been included in ruby 1.9 and ruby 1.8 is not supported
anymore. You can solve the issue with ruber by removing the line requiring it
(line 42 from bin/ruber) as it is only there for compatibility with ruby 1.8.

Yes, I do speak Italian. If you prefer, we can use that.

Stefano

@alexbottoni
Copy link
Author

No way:

$ ruber
/usr/lib/ruby/1.9.1/psych.rb:203:in parse': (<unknown>): did not find expected node content while parsing a flow node at line 7 column 19 (Psych::SyntaxError) from /usr/lib/ruby/1.9.1/psych.rb:203:inparse_stream'
from /usr/lib/ruby/1.9.1/psych.rb:151:in parse' from /usr/lib/ruby/1.9.1/psych.rb:127:inload'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification.rb:55:in initialize' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification.rb:41:innew'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification.rb:41:in full' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/component_manager.rb:640:inload_component'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/bin/ruber:68:in <top (required)>' from /usr/local/bin/ruber:23:inload'
from /usr/local/bin/ruber:23:in `

I removed the "require 'facets/kernel/require_relative'" line from bin/ruber but...

@stcrocco
Copy link
Owner

Excerpts from alexbottoni's message of 2015-02-24 19:30:22 +0100:

No way:

$ ruber
/usr/lib/ruby/1.9.1/psych.rb:203:in parse': (<unknown>): did not find expected node content while parsing a flow node at line 7 column 19 (Psych::SyntaxError) from /usr/lib/ruby/1.9.1/psych.rb:203:inparse_stream'
from /usr/lib/ruby/1.9.1/psych.rb:151:in parse' from /usr/lib/ruby/1.9.1/psych.rb:127:inload'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification.rb:55:in initialize' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification.rb:41:innew'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification.rb:41:in full' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/component_manager.rb:640:inload_component'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/bin/ruber:68:in <top (required)>' from /usr/local/bin/ruber:23:inload'
from /usr/local/bin/ruber:23:in `

I removed the "require 'facets/kernel/require_relative'" line from bin/ruber but...

This is the problem I mentioned in a previous mail regarding YAML. Ruby up to
1.9.1 used a yaml library called syck; ruby 1.9.2 and 1.9.3 switched to a new
library, psych, but allowed the user to use the old library; from ruby 2.0.0,
only the new library was availlable. The problem is that some syntax which sick
accepted as valid YAML is invalid according to psych. Unfortunately, Ruber used
that syntax. Since I mainly developed it using ruby 1.9.3 and couldn't think of
an alternative way to write those YAML files, I simpy forced the use of the old
library. It's in line 38 of bin/ruber:

YAML::ENGINE.yamler = 'syck'

Which version of ruby are you using? Could please run the following in irb and
post the output?

require 'yaml'
YAML::ENGINE.yamler = 'syck'

Either your ruby version is 2.x or there's something strange going on, as it
seems that forcing the use of 'syck' isn't working.

Stefano

@alexbottoni
Copy link
Author

Actually, my Linux box starts with Ruby 2.2.0 but... see this session log:

alex@caliban ~ $ ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [i686-linux]
alex@caliban ~ $ rvm use system
Now using system ruby.
alex@caliban ~ $ ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [i686-linux]
alex@caliban ~ $ irb
irb(main):001:0> require 'yaml'
=> true
irb(main):002:0> YAML::ENGINE.yamler = 'syck'
=> "syck"
irb(main):003:0>
alex@caliban ~ $ ruber
/usr/lib/ruby/1.9.1/psych.rb:203:in parse': (<unknown>): did not find expected node content while parsing a flow node at line 7 column 19 (Psych::SyntaxError) from /usr/lib/ruby/1.9.1/psych.rb:203:inparse_stream'
from /usr/lib/ruby/1.9.1/psych.rb:151:in parse' from /usr/lib/ruby/1.9.1/psych.rb:127:inload'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification.rb:55:in initialize' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification.rb:41:innew'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification.rb:41:in full' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/component_manager.rb:640:inload_component'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/bin/ruber:68:in <top (required)>' from /usr/local/bin/ruber:23:inload'
from /usr/local/bin/ruber:23:in `

'
alex@caliban ~ $

Don't know what's going on...

@stcrocco
Copy link
Owner

Excerpts from alexbottoni's message of 2015-02-24 22:26:54 +0100:

Actually, my Linux box starts with Ruby 2.2.0 but... see this session log:

alex@caliban ~ $ ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [i686-linux]
alex@caliban ~ $ rvm use system
Now using system ruby.
alex@caliban ~ $ ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [i686-linux]
alex@caliban ~ $ irb
irb(main):001:0> require 'yaml'
=> true
irb(main):002:0> YAML::ENGINE.yamler = 'syck'
=> "syck"
irb(main):003:0>
alex@caliban ~ $ ruber
/usr/lib/ruby/1.9.1/psych.rb:203:in parse': (<unknown>): did not find expected node content while parsing a flow node at line 7 column 19 (Psych::SyntaxError) from /usr/lib/ruby/1.9.1/psych.rb:203:inparse_stream'
from /usr/lib/ruby/1.9.1/psych.rb:151:in parse' from /usr/lib/ruby/1.9.1/psych.rb:127:inload'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification.rb:55:in initialize' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification.rb:41:innew'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification.rb:41:in full' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/component_manager.rb:640:inload_component'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/bin/ruber:68:in <top (required)>' from /usr/local/bin/ruber:23:inload'
from /usr/local/bin/ruber:23:in `

'
alex@caliban ~ $

Don't know what's going on...

Please, try to change lines 38-40 of bin/ruber so that they only read
YAML::ENGINE.yamler='syck'
and see whether you get an error message from that.

Stefano

@alexbottoni
Copy link
Author

Using this instance of the bin/ruber file:

#!/usr/bin/env ruby

=begin rdoc
Helper module to resolve the conflict between +Enumerable#count+ and the +count+
methods a lot of Qt/KDE classes provide.

It is essentially like +Enumerable+, but defines a count_items method
rather than a +count+ method. Qt/KDE classes can then mix-in this module instead
of +Enumerable+. The same effect could have been obtained by modifying +Enumerable+,
but that could have interferred with other libraries
=end
module QtEnumerable

include Enumerable

begin
alias :count_items :count
undef_method :count
rescue NoMethodError
end

end

require 'korundum4'

#In korundum 4.4, there's no kio.rb. So, check whether KDE::IconButton (one of
#the classes defined in kio.rb in korundum 4.5) is defined and only attempt to
#require kio if it isn't.

#In theory, one should check the KDE version, but there's no way to do that (at
#least as far as I know)
unless defined? KDE::IconButton
require 'kio'
end

require 'yaml'

psych (used by default in ruby 1.9.3) doesn't correctly parse some YAML files

YAML::ENGINE.yamler = 'syck'

require 'ruber/version'
require 'ruber/qt_sugar'
require 'ruber/kde_sugar'
require 'ruber/ktexteditor_sugar'
require 'ruber/utils'
require 'ruber/exception_widgets'
require 'ruber/component_manager.rb'

data = KDE::AboutData.new "ruber", "", KDE::ki18n("Ruber"), Ruber::VERSION,
KDE.ki18n('A Ruby IDE written in Ruby'), KDE::AboutData::License_GPL
data.add_author KDE.ki18n('Stefano Crocco'), KDE::LocalizedString.new,
Qt::ByteArray.new('stefano.crocco@alice.it')
data.bug_address = Qt::ByteArray.new "http://github.com/stcrocco/ruber/issues"
data.homepage = Qt::ByteArray.new 'http://stcrocco.github.com/ruber'

KDE::CmdLineArgs.init ARGV, data
opts = KDE::CmdLineOptions.new
opts.add("config-file ", KDE.ki18n("Use FILE instead of the default "
"config file"), "")
opts.add("file ", KDE.ki18n("Open the file FILE. This option may be"
" repeated more than one times and is "
"mostly useful to open files ending in "
".krprj as files instead of as projects"))
opts.add("+[FILES]", KDE.ki18n("Open FILES. Files with extension .krprj will "
"be opened as projects. Only the more recent "
"project will be used"))
KDE::CmdLineArgs.add_cmd_line_options opts

manager = Ruber::ComponentManager.new
manager.load_component 'application'
begin Ruber[:app].exec
rescue SystemExit, SignalException
raise
rescue Exception => ex
dlg = Ruber::ExceptionDialog.new ex, nil, false
dlg.exec
Qt::Internal.application_terminated = true
raise
end

I'm getting this backtrace:

$ ruber
cannot load such file -- facets/kernel/require_relative
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
/var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/choose_plugins_dlg.rb:21:in <top (required)>' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window_actions.rb:24:in<top (required)>'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
/var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window.rb:31:in <top (required)>' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification_reader.rb:95:inblock in process_pdf'
/var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification_reader.rb:92:in each' /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification_reader.rb:92:inprocess_pdf'
/var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification.rb:100:in complete_processing' /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification.rb:42:infull'
/var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/component_manager.rb:640:in load_component' /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/application/application.rb:393:inblock in load_core_components'
/var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/application/application.rb:391:in each' /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/application/application.rb:391:inload_core_components'
/var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/application/application.rb:117:in initialize' /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/component_manager.rb:642:innew'
/var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/component_manager.rb:642:in load_component' /var/lib/gems/1.9.1/gems/ruber-0.0.10/bin/ruber:71:in<top (required)>'
/usr/local/bin/ruber:23:in load' /usr/local/bin/ruber:23:in

'

Look like facets/kernel/require_relative is required by component_manager.rb and application.rb, as well.

Please note that the bin/ruber file installed by gem command did not contain these lines:

require 'yaml'

psych (used by default in ruby 1.9.3) doesn't correctly parse some YAML files

begin YAML::ENGINE.yamler = 'syck'
rescue NameError #YAML::ENGINE only exists in ruby 1.9.2
end

That appear in the github latest branch, instead (https://github.com/stcrocco/ruber/blob/master/bin/ruber). I added the required lines by hand.

@stcrocco
Copy link
Owner

Excerpts from alexbottoni's message of 2015-02-25 11:32:39 +0100:

Using this instance of the bin/ruber file:

#!/usr/bin/env ruby

=begin rdoc
Helper module to resolve the conflict between +Enumerable#count+ and the +count+
methods a lot of Qt/KDE classes provide.

It is essentially like +Enumerable+, but defines a count_items method
rather than a +count+ method. Qt/KDE classes can then mix-in this module instead
of +Enumerable+. The same effect could have been obtained by modifying +Enumerable+,
but that could have interferred with other libraries
=end
module QtEnumerable

include Enumerable

begin
alias :count_items :count
undef_method :count
rescue NoMethodError
end

end

require 'korundum4'

#In korundum 4.4, there's no kio.rb. So, check whether KDE::IconButton (one of
#the classes defined in kio.rb in korundum 4.5) is defined and only attempt to
#require kio if it isn't.

#In theory, one should check the KDE version, but there's no way to do that (at
#least as far as I know)
unless defined? KDE::IconButton
require 'kio'
end

require 'yaml'

psych (used by default in ruby 1.9.3) doesn't correctly parse some YAML files

YAML::ENGINE.yamler = 'syck'

require 'ruber/version'
require 'ruber/qt_sugar'
require 'ruber/kde_sugar'
require 'ruber/ktexteditor_sugar'
require 'ruber/utils'
require 'ruber/exception_widgets'
require 'ruber/component_manager.rb'

data = KDE::AboutData.new "ruber", "", KDE::ki18n("Ruber"), Ruber::VERSION,
KDE.ki18n('A Ruby IDE written in Ruby'), KDE::AboutData::License_GPL
data.add_author KDE.ki18n('Stefano Crocco'), KDE::LocalizedString.new,
Qt::ByteArray.new('stefano.crocco@alice.it')
data.bug_address = Qt::ByteArray.new "http://github.com/stcrocco/ruber/issues"
data.homepage = Qt::ByteArray.new 'http://stcrocco.github.com/ruber'

KDE::CmdLineArgs.init ARGV, data
opts = KDE::CmdLineOptions.new
opts.add("config-file ", KDE.ki18n("Use FILE instead of the default "
"config file"), "")
opts.add("file ", KDE.ki18n("Open the file FILE. This option may be"
" repeated more than one times and is "
"mostly useful to open files ending in "
".krprj as files instead of as projects"))
opts.add("+[FILES]", KDE.ki18n("Open FILES. Files with extension .krprj will "
"be opened as projects. Only the more recent "
"project will be used"))
KDE::CmdLineArgs.add_cmd_line_options opts

manager = Ruber::ComponentManager.new
manager.load_component 'application'
begin Ruber[:app].exec
rescue SystemExit, SignalException
raise
rescue Exception => ex
dlg = Ruber::ExceptionDialog.new ex, nil, false
dlg.exec
Qt::Internal.application_terminated = true
raise
end

I'm getting this backtrace:

$ ruber
cannot load such file -- facets/kernel/require_relative
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
/var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/choose_plugins_dlg.rb:21:in <top (required)>' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window_actions.rb:24:in<top (required)>'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
/var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window.rb:31:in <top (required)>' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification_reader.rb:95:inblock in process_pdf'
/var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification_reader.rb:92:in each' /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification_reader.rb:92:inprocess_pdf'
/var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification.rb:100:in complete_processing' /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/plugin_specification.rb:42:infull'
/var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/component_manager.rb:640:in load_component' /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/application/application.rb:393:inblock in load_core_components'
/var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/application/application.rb:391:in each' /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/application/application.rb:391:inload_core_components'
/var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/application/application.rb:117:in initialize' /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/component_manager.rb:642:innew'
/var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/component_manager.rb:642:in load_component' /var/lib/gems/1.9.1/gems/ruber-0.0.10/bin/ruber:71:in<top (required)>'
/usr/local/bin/ruber:23:in load' /usr/local/bin/ruber:23:in

'

Look like facets/kernel/require_relative is required by component_manager.rb and application.rb, as well.

Please note that the bin/ruber file installed by gem command did not contain these lines:

require 'yaml'

psych (used by default in ruby 1.9.3) doesn't correctly parse some YAML files

begin YAML::ENGINE.yamler = 'syck'
rescue NameError #YAML::ENGINE only exists in ruby 1.9.2
end

That appear in the github latest branch, instead (https://github.com/stcrocco/ruber/blob/master/bin/ruber). I added the required lines by hand.


Reply to this email directly or view it on GitHub:
#17 (comment)

I just updated the github versions with changes which should make ruber work
correctly with ruby 2.x. I haven't uploaded a new version of the gem yet because
the new version needs some testing. However, you can install the gem by runnning
rake gem in the ruber directory downloaded from github. This will create a
ruber-0.0.10.gem file in the same directory which you can install with gem install ruber-0.0.10.gem

Stefano

@alexbottoni
Copy link
Author

Ok, now it is launching. Unfortunately, as soon as you try to open any kind of ASCII/UTF8 file (.rb, .txt. etc.) it crashes with the following backtrace:

$ ruber
Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QString)
Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QString)
/var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/gui_states_handler.rb:203:in block in change_state': methodmethod_missing' called on unexpected T_NODE object (0x9935824 flags=0xf2a71c klass=0x0) (NotImplementedError)
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/gui_states_handler.rb:202:in each' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/gui_states_handler.rb:202:inchange_state'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window.rb:103:in block in initialize' from /usr/lib/ruby/vendor_ruby/1.9.1/Qt/qtruby4.rb:2427:incall'
from /usr/lib/ruby/vendor_ruby/1.9.1/Qt/qtruby4.rb:2427:in invoke' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window_internal.rb:152:inqt_metacall'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window_internal.rb:152:in current_document_changed' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window_internal.rb:152:inslot_active_editor_changed'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/world/environment.rb:191:in qt_metacall' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/world/environment.rb:191:inactive_editor_changed'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/world/environment.rb:191:in activate_editor' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/world/environment.rb:434:incurrent_tab_changed'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/world/environment.rb:144:in qt_metacall' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/world/environment.rb:144:inmethod_missing'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/world/environment.rb:144:in editor_for!' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window_internal.rb:209:ingui_open_file'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window_actions.rb:71:in block in open_file' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window_actions.rb:71:inmap'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window_actions.rb:71:in open_file' from /usr/lib/ruby/vendor_ruby/1.9.1/KDE/korundum4.rb:60:inqt_metacall'
from /usr/lib/ruby/vendor_ruby/1.9.1/KDE/korundum4.rb:60:in method_missing' from /usr/lib/ruby/vendor_ruby/1.9.1/KDE/korundum4.rb:60:inexec'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/bin/ruber:67:in <top (required)>' from /usr/local/bin/ruber:23:inload'
from /usr/local/bin/ruber:23:in `

'

@stcrocco
Copy link
Owner

Excerpts from alexbottoni's message of 2015-02-25 13:15:37 +0100:

Ok, now it is launching. Unfortunately, as soon as you try to open any kind of ASCII/UTF8 file (.rb, .txt. etc.) it crashes with the following backtrace:

$ ruber
Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QString)
Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QString)
/var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/gui_states_handler.rb:203:in block in change_state': methodmethod_missing' called on unexpected T_NODE object (0x9935824 flags=0xf2a71c klass=0x0) (NotImplementedError)
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/gui_states_handler.rb:202:in each' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/gui_states_handler.rb:202:inchange_state'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window.rb:103:in block in initialize' from /usr/lib/ruby/vendor_ruby/1.9.1/Qt/qtruby4.rb:2427:incall'
from /usr/lib/ruby/vendor_ruby/1.9.1/Qt/qtruby4.rb:2427:in invoke' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window_internal.rb:152:inqt_metacall'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window_internal.rb:152:in current_document_changed' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window_internal.rb:152:inslot_active_editor_changed'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/world/environment.rb:191:in qt_metacall' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/world/environment.rb:191:inactive_editor_changed'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/world/environment.rb:191:in activate_editor' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/world/environment.rb:434:incurrent_tab_changed'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/world/environment.rb:144:in qt_metacall' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/world/environment.rb:144:inmethod_missing'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/world/environment.rb:144:in editor_for!' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window_internal.rb:209:ingui_open_file'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window_actions.rb:71:in block in open_file' from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window_actions.rb:71:inmap'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/lib/ruber/main_window/main_window_actions.rb:71:in open_file' from /usr/lib/ruby/vendor_ruby/1.9.1/KDE/korundum4.rb:60:inqt_metacall'
from /usr/lib/ruby/vendor_ruby/1.9.1/KDE/korundum4.rb:60:in method_missing' from /usr/lib/ruby/vendor_ruby/1.9.1/KDE/korundum4.rb:60:inexec'
from /var/lib/gems/1.9.1/gems/ruber-0.0.10/bin/ruber:67:in <top (required)>' from /usr/local/bin/ruber:23:inload'
from /usr/local/bin/ruber:23:in `

'

This is strange. It works correctly for me using ruby 1.9.3p551 with qtruby
4.14.3 and korundum 4.14.3. Are you using the same versions? Does this error
happen every time you try to open a file? (Sometimes, there are random crashes
seemingly caused by something internal to qtruby which I've never been able to
debug). Could you try adding the following lines:

p d
p d.action

just before line 203 in lib/ruber/gui_states_handler.rb and post the output?

Stefano

@alexbottoni
Copy link
Author

I just tried to add the two lines you suggested and... Ruber works like a charm with them.

As a cross-check, I tried to remove them again and it crashed. It's quite weird for me, given that these two lines seem to be intended only as a tracer, not as a bugfix.

Anyway, I'm sending you a couple of session logs and backtraces (with and without the mentioned two lines) at your email address at alice.it.

My configuration is as follow:
ruby-qt4 = 4.13
korundum4 = 4.13
ruby = 1.9.3p484

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants