Cross-platform standalone Ruby apps?

Hi,

I am new here, experience with PHP and looking for a similar language
that permits to do cross-platform programming of database driven apps,
so that they run on Mac OS X, Linux and Windows from one codebase with
some recompiling.

Preferably relatively easy to distribute.

Could Ruby work for this? And what would be the best database to go for?

(I read about Ruby on Rails, might be a nice addition to my PHP
knowledge but first I need to know the answer to my question above)

Hope you can help me out!

Pieter

Pieter K. wrote:

Sure. I am assuming you are talking about gui database apps. If so,
I can recommend both FXRuby (although, last time I checked its OS X
support was lacking) and RubyGtk2. Both have worked well for me in the
past.

There is also WxRuby and QtRuby, but I don’t have any experience with
either.

Whichever you choose, be sure to use RubyScript2Exe to package
everything up into one easy to distribute executable.

As far as database management systems, you would need to give more info
on your requirements before that could be answered. Ruby plays well
with most every dbms.

HTH,

Jamey C.

Jamey C. wrote:

I can recommend both FXRuby (although, last time I checked its OS X
support was lacking) and RubyGtk2. Both have worked well for me in the
past.

There is also WxRuby and QtRuby, but I don’t have any experience with
either.
My personal preference is QTRuby. The widgets are “prettier” and there
is an excellent book from the Pragmatic Programmers teaching exactly how
it works! If you’re on Linux, you can go a couple of steps further and
build KDE applications with Korundum or Kommander.

As far as database management systems, you would need to give more info
on your requirements before that could be answered. Ruby plays well
with most every dbms.
SQLite, MySQL, PostgreSQL, Oracle and MS SQL Server are supported for
sure. I’m not sure about DB2.

Jamey C. wrote:

Pieter K. wrote:

Preferably relatively easy to distribute.

Whichever you choose, be sure to use RubyScript2Exe to package
everything up into one easy to distribute executable.

I’d advise to use distribution-specific packaging for Linuxen. I get
twitchy when I have to install an app that APT won’t know about.

David V.

David V. wrote:

David V.

Which means you need at least a .deb and .rpm binary package, Debian
source and RPM source, a pure source tarball for everyone else and a
friend in the Gentoo community to make you an ebuild from the tarball.
:slight_smile: Makes gem look better and better with each word I type. :slight_smile:

Seriously, though, since I run Gentoo, I have similar problems. Gentoo
has its own repository, and quite a few of the more popular gems are
already packaged. Rails, rake, gem itself, of course, nitro, fxruby,
qtruby, etc. are all in Gentoo.

But if there’s a gem I want that isn’t in the Gentoo Portage tree, I can
install it. Portage doesn’t know it’s there. I install source tarballs
all the time; they usually go into /usr/local by default, which keeps
them out of the way of the main distro which puts everything in /usr by
default.

Pieter K. wrote:

(I read about Ruby on Rails, might be a nice addition to my PHP
knowledge but first I need to know the answer to my question above)

Hope you can help me out!

Database: PostgreSQL
GUI: Web (stand-alone via a webrick servlet)

M. Edward (Ed) Borasky wrote:

Which means you need at least a .deb and .rpm binary package, Debian
source and RPM source, a pure source tarball for everyone else and a
friend in the Gentoo community to make you an ebuild from the tarball.
:slight_smile: Makes gem look better and better with each word I type. :slight_smile:

Gems aren’t a bad choice either - the problem is that there Are Some
Issues with applications in gems. At least there were with “resource”
lookup, Trans’ Facets couldn’t find its default data / config files a
while ago.

I wonder if that kink was already ironed out.

And with decent tool support, it can’t be THAT hard to provide native
packaging once you set up your environment right. Never tried though,
I’ll admit.

But if there’s a gem I want that isn’t in the Gentoo Portage tree, I can
install it. Portage doesn’t know it’s there. I install source tarballs
all the time; they usually go into /usr/local by default, which keeps
them out of the way of the main distro which puts everything in /usr by
default.

I mainly have problems with config file droppings since I already forget
to purge debs instead of removing. And what with stupid me being a
sucker for late development releases once I see a half-decent review…
Well, let’s say that Ubuntu Breezy -> Dapper Flight 5 package config
file update bug that clobbered the resolver (“Argh, teh interwebz don’t
work!”) was not particularly fun considering the “google for an answer”
solution wasn’t available.

David V.

Trans wrote:

Could Ruby work for this? And what would be the best database to go for?

  1. Rails also works with MySQL and SQLite, which in turn work on
    Windows, Mac and Linux

  2. I don’t think any recompiling is required to use Ruby on Rails,
    though in some cases (Gentoo Linux, for example) you end up recompiling
    the Ruby installer and the database in the course of installing them.
    But you don’t recompile any Rails code.

M. Edward (Ed) Borasky wrote:

Trans wrote:

Could Ruby work for this? And what would be the best database to go for?

  1. Rails also works with MySQL and SQLite, which in turn work on
    Windows, Mac and Linux

  2. I don’t think any recompiling is required to use Ruby on Rails,
    though in some cases (Gentoo Linux, for example) you end up recompiling
    the Ruby installer and the database in the course of installing them.
    But you don’t recompile any Rails code.

If I read all the comments, I doubt whether Ruby will be the right
choice for me. However, I like the initiative, and perhaps it will turn
out to be very useful in the future.

For now I guess I’d have to focus more on Java, as Python does also not
seem to deliver what I am looking for…

On 9/11/06, Rick DeNatale [email protected] wrote:

I got three things out of the responses so far.

  1. some discussion …

  2. Statements that Ruby …

  3. Statements that …

  4. A side discussion over …

I wasn’t conciously trying to imitate King Arthur in Monty Python’s Holy
Grail.

Honest!


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

On 9/11/06, Pieter K. [email protected] wrote:

But you don’t recompile any Rails code.

If I read all the comments, I doubt whether Ruby will be the right
choice for me. However, I like the initiative, and perhaps it will turn
out to be very useful in the future.

For now I guess I’d have to focus more on Java, as Python does also not
seem to deliver what I am looking for…

I’m curious as to what you saw in the responses which made you think
that Ruby isn’t the right choice.

I got three things out of the responses so far.

  1. some discussion based on the assumption that you were looking for a
    gui app rather than something else, e.g. a web app. Since you never
    responded to that, if it was a mis-assumption then don’t assume that
    Ruby won’t work for other types of apps.

  2. Statements that Ruby is pretty agnostic when it comes to a particular
    RDB.

  3. Statements that you normally don’t have to recompile for different
    platforms. Was your requirement really that there be “some
    recompiling” that there be “some” recompiling?

  4. A side discussion over whether or not code for linux distributions
    should be packaged in a distro specific package format, and if so what
    tools to use for that. That’s a separate discussion which is
    independent of whether you use php, ruby, java, or anything else.


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

On 9/11/06, Pieter K. [email protected] wrote:

to work with a standalone database, so no web connection involved…
Err, you don’t need a “web connection” to use a Ruby on Rails
application. Why do you think you do?

Joe

If you go for a GUI, I’d give it to RubyGtk/Gnome. The bindings are very
complete, the documentation is acceptable, there are more than enough
examples provided, and what is the most important part, there are quite
many people able to help you with it. :slight_smile:

However, and this is my personal opinion, FOX has a huge advantage for
me, its that it can be installed easier (i just have to compile fox and
fxruby for it to work).

Ruby-Tk works out of the box but its so ugly that god kills a kitten
every time someone creates a big app with it …

Rick Denatale wrote:

I’m curious as to what you saw in the responses which made you think
that Ruby isn’t the right choice.

I got the impression that GUI development was rather weak, and that the
main focus lies on RoR. However, as I am looking for something to do
desktop development and I understood that RoR is for web dev, I ignored
the remarks on no recompiling for RoR (of course, webdev…)

I need a decent GUI (could be done by scripting, perhaps) which allows
to work with a standalone database, so no web connection involved…