A Ruby IDE written in Ruby
To run Ruber, you need to have the following installed
Some plugins need external libraries and/or programs to work. If you don’t have these requirements, then some of the plugins won’t work. Ruber itself and the other plugins will still work correctly, however. The programs needed by the plugins are:
This is the recommanded way to install Ruber, and, if possible, you should always used this method. It makes use of the package manager provided by your distribution to install most of the required libraries, and uses rubygems to install Ruber and the gems which aren’t availlable as packages for your distribution. This is what you need to do:
korundum
, korundum4
or kdebindings-ruby
). Depending
on the packages you have already installed on your system, other packages
may also be installed.The hard way to install ruber is to install the needed dependencies by hand. In particular (depending on what you have already installed) this may mean installing ruby, the KDE libraries and the KDE Ruby bindings. If you want, you can also mix the easy and the hard way, installing some of the above programs using your package manager and some other by hand.
Warning: installing the hard way is much more difficult than using the easy way, so you’re advised not to use this method, unless absolutely needed (that is, if the easy method doesn’t work for some reason which can’t be fixed).
/usr/local
) and
add a prefix or suffix to the executable name (this is useful if you want two)
versions of ruby installed at the same time. To change the installation directory,
pass the --prefix DIR
argument to configure, where DIR
is the directory you
want to install ruby into. To add a prefix or a suffix to the executables, use
the --program-prefix
or --program-suffix
options, followed by the prefix or
suffix you want. Use ./configure --
help to see all the options accepted by
configure
I strongly discourage from building the KDE libraries by hand, given the large
number of dependencies they have and the fact that every distribution has packages
for them. To install using a package manager, simply install the kdelibs
package.
If you really want to install by hand, here’s what to do
kdelibs
tarball. Do not follow the instructions linked on
the download page, as they’re for people developing KDE itselfCMAKE_INSTALL_PREFIX
option, which controls
the directory KDE will be installed into, and change it as you like. After changing
the options you need, press c
to configure and g
to generate. Then e
to
exitFirst, Make sure you have both the Ruby and KDE headers installed. If you installed
Ruby or the KDE libraries using the package manager, depending on your distribution,
you may not have installed the header files needed by the compiler. Using your
package manager, see if there are packages called something like ruby-devel
and kdelibs-devel
(or ruby-headers
and kdelibs-headers
). If so, install
them. If you installed Ruby and the KDE libraries by hand, the header files are
already installed. The next part of the installation changes depending on the version
of KDE you’ve installed.
kdebindings
tarball from the KDE home page.
Choose the same version as your KDE libraries.
sed -i -e 's#STR2CSTR(rb_obj_as_string#RSTRING_PTR(rb_obj_as_string#'\
ruby/korundum/src/krubypluginfactory.cpp@
sed -i -e "s#STR2CSTR#StringValueCStr#"\
ruby/korundum/src/krubypluginfactory.cpp@
mkdir build
smoke
installedCMAKE_INSTALL_PREFIX
option. Most likely, you’ll also want to
avoid building the bindings for languages other than Ruby, so set the corresponding BUILD_*
options (for example, BUILD_perl
) to OFF
. If you already have smoke
installed,
also set BUILD_smoke
to OFF
. After changing
the options you need, press c
to configure and g
to generate. Then e
to
exitsmokegen
, smokeqt
, smokekde
, qtruby
and korundum
tarballs
from the KDE website.smokeqt
and smokekde
packages. If so, you can ignore both them and smokegen
in the previous list.CMAKE_INSTALL_PREFIX
option. When you’re finished with the options,
press c
to configure and g
to generate. Then e
to exit.rake
: gem install rake (you don’t need this if using ruby 1.9, unless you want
to install a newer version of rake)rspec
: gem install rspecrak
: gem install rak. If you’re using ruby 1.9, you may want to edit
the source code of rak to avoid encoding issues. To do so, you’ll have to find
out where rubygems installed it. It’ll be in the gems/rak-x.y.z
subdirectory
of one of the directories listed by gem env command under the GEM PATHS
heading. Once located the directory where rak is installed, make the following
changes to the bin/rak
file (thanks to FooBarWidget who made a pull request
with this fix on the rak github page):
# encoding: binary
f = File.open(fn, "r")
with f = File.open(fn, "rb")
rdoc
: (shell) gem install rdocRuber’s documentation is written in YARD format, using Textile as markup format. If you truly want, you can use RDoc to generate the documentation, but you’ll miss some information (in particular regarding signals and slots) and the formatting will be missing or wrong.
gem environment
, in particular at the GEM_PATHS
entry. Ruber
will be installed under the gems/ruber-x.y.z
subdirectory of one of the
directories listed there)OUTPUT_DIR
is the directory where you want to install the documentation. If you don’t specify
it, it’ll be installed under the doc
directory in the Ruber installation directory.OUTPUT_DIR
is the directory where you want to install the documentation. If you don’t specify
it, it’ll be installed under the rdoc
directory in the Ruber installation directory.Currently, the only way to install a plugin is to download the tarball and extract
it in one of the directories where Ruber looks for plugins( by default, they are
the plugins
subdirectory of the Ruber installation directory and
$KDEHOME/share/apps/ruber/plugins
). This should create a subdirectory named as
the plugin in that directory.
If you want to use a version of Ruber which hasn’t as yet been released, you can download the source code from the git repository and install it by hand. To do so, make sure you have all the prerequisites installed, then download the source code doing one of the following:
Download .tar.gz
or the Download .zip
entry.
This will download a compressed file with the appropriate extension on your computer.
Extract this file with the appropriate method.Now, enter the directory where you’ve downloaded the source code and issue rake
ruber. This is needed to generate files describing the user interface (mainly
dialogs) from files produced by the Qt Designer
program. Once this is done,
you can run Ruber from this directory with the following command: ruby -Ilib bin/ruber.
If you only want to try the development version once or twice, or if you want to
help developing Ruber, that’s all you need to do. If you want to go on using it,
and want to run it with a simple ruber
, you’ll have to build a gem with gem build
ruber.gemspec followed by gem install ruber-x.y.z.gem, where ruber-x.y.z
is
the file generated by the previous command.