ODBC app in Ruby - I don't believe it

I’m trying to figure out what’s so cool about Ruby. I need to create a
web app that runs on Windows 7 and talks to multiple ODBC data sources.
I wanted to start with just a simple app but I’ve been trying for three
days on three different machines with no success. I tried setting up
Ruby 1.9.2, 1.9.1, 1.8.2, and 1.8.6 and can’t even begin to start
developing anything.

My steps have been
Uninstall and remove all existing Ruby installations
Install Ruby
install DevKit
run command gem install rails
run command gem install rake
run command gem install mysql
run command gem install mysql2
run command rails new mydbapp -d mysql
run command rails new mydbapp -d mysql2

I’ve tried numerous combinations of the above steps (obviously I didn’t
perform both the mysql and mysql2 at the same time) and get errors on
install rails, install mysql, install mysql2, and rails new mydbapp.

I’ve searched the web for three days for answers to all the different
errors. I’ve found that many people seem to have the same or very
similar errors and it doesn’t look like there’s many successful
resolutions.

So since Ruby can’t create a web database app on Windows 7 and there’s
no descent place to find useful answers to problems that lead to
successful resolutions, and creating a simple app requires a ridiculous
number of steps to just set it up before you ever get to write any code,
what’s so cool about it? I’m serious, I’d like an answer. I’d like to
see it work but all I’ve seen is errors. I don’t think it can do it but
I’ve heard people say that it’s the hot new way to do web db apps. I’ve
been writing web db apps for the past 12 years in a variety of languages
on numerous platforms and I’ve never had to deal with this. I don’t see
how anyone can spend this much non-billable time before your ever get to
write any code. Can anyone answer any of these questions?

Hi Ed,

not much we can do here, since you didn’t include any kind of error
message or specific question with a problem.

Maybe it’s the Windows platform; maybe not. I’m working primarily on W7
as my workstation but it’s such a horrible development environment I
always run a virtual machine either Debian or Ubuntu and therein no such
problems arose yet.

  • Markus

On 10/03/2010 12:26 AM, Ed Reed wrote:

install DevKit

see it work but all I’ve seen is errors. I don’t think it can do it but
I’ve heard people say that it’s the hot new way to do web db apps. I’ve
been writing web db apps for the past 12 years in a variety of languages
on numerous platforms and I’ve never had to deal with this. I don’t see
how anyone can spend this much non-billable time before your ever get to
write any code. Can anyone answer any of these questions.

Hi Ed,

Sorry for your frustration. However, you seem to be conflating Ruby (the
language) and Ruby on Rails (the web framework). You might get better
answers on the Rails forum/mailing list:
http://www.ruby-forum.com/forum/3

Some browsing around landed me here:

which describes installing Ruby and Rails on Windows 7, so it certainly
is possible. Unfortunately, it does not describe using MySQL. Here’s
another reference, which does mention MySQL:
http://www.hashemzahran.com/riding-the-rails-installing-ruby-on-rails/
My apologies if you have already seen these.

Without seeing the actual errors, I am afraid that’s the best I can do.

-Justin

I created a Ruby application (Windows Vista) that read and wrote to an
Access DB. It took under 5 minutes to build. You could hardly go any
faster with Access VBA.

Stick with Ruby but think twice about Rails. It looks very good to me
but personally I can do without all the complexity right now. It’s for
certain types of applications written in certain ways. You probably
don’t need it.

Ed Reed wrote:

I need to create a
web app that runs on Windows 7 and talks to multiple ODBC data sources.

run command gem install rails

You don’t need Rails to talk to a database, nor to build a web app
(there are other options). But if you want to use Rails, then a Rails
forum would be a better place to ask. This forum is for Ruby, the
programming language.

In any case, I’d suggest you start with a basic hello-world type of web
app, perhaps using sqlite3 if you want a database, before getting it to
connect to some other data source.

You’re putting yourself at a disadvantage by running under Windows, but
you could also look at some of the prepackaged bundles like Instant
Rails.

There’s tons of documentation about Rails, so I’m sure with a bit of
googling you could find some quick-start guides for Rails under Windows.

run command gem install mysql
run command gem install mysql2

I don’t use Windows myself, but I’m pretty sure you don’t need the mysql
gem to talk to an ODBC data source.

For what it’s worth, I do have a Rails app running under Linux talking
happily to MS SQL Server via ODBC. If I remember correctly, the bits I
needed were:

  • unixODBC and unixODBC-devel
  • freetds (Linux interface to SQL Server with ODBC API)
  • ruby-odbc gem
  • activerecord-sqlserver-adapter gem

config/environment.rb was something like:

development:
adapter: sqlserver
mode: odbc
dsn: XXXXXXX
username: xxxxxxxx
password: xxxxxxxx

On Oct 3, 4:26 am, Ed Reed [email protected] wrote:

install DevKit
run command gem install rails
run command gem install rake
run command gem install mysql
run command gem install mysql2
run command rails new mydbapp -d mysql
run command rails new mydbapp -d mysql2

Rails 3 (latest release of it) requires either Ruby 1.8.7 or Ruby
1.9.2. If you haven’t installed one of these versions you’re going to
have problems.

Second, have you read Ruby on Rails guides?

I’ve tried numerous combinations of the above steps (obviously I didn’t
perform both the mysql and mysql2 at the same time) and get errors on
install rails, install mysql, install mysql2, and rails new mydbapp.

If you installed RubyInstaller, there are plenty of tutorials
explaining how to get everything installed:

I’ve searched the web for three days for answers to all the different
errors. I’ve found that many people seem to have the same or very
similar errors and it doesn’t look like there’s many successful
resolutions.

What errors? you’re not providing the output that you’re receiving so
is highly unlikely we can help you without them.

It is important also that you don’t confuse Rails with Ruby.

“Ed Reed” [email protected] wrote in message
news:[email protected]

I’m trying to figure out what’s so cool about Ruby. I need to create a
web app that runs on Windows 7 and talks to multiple ODBC data sources.
I wanted to start with just a simple app but I’ve been trying for three
days on three different machines with no success. I tried setting up
Ruby 1.9.2, 1.9.1, 1.8.2, and 1.8.6 and can’t even begin to start
developing anything.

Hello Ed:

DBI appears to be a popular way to access to ODBC in Ruby. DBI provides
a
consistence way to access multiple DBs including via ODBC if you want.
One
thread I read said that the Windows Ruby Installer installs DBI
automatically but it was an old thread and I haven’t tried DBI myself on
Windows (I’m on Vista) so I can’t confirm but maybe these links will
help
you:

http://blog.hlie.org/
http://www.kitebird.com/articles/ruby-dbi.html

There is also ruby-odbc but it appears to be used along with DBI so I’m
not
sure I see the point:

http://www.ch-werner.de/rubyodbc/
http://www.ruby-forum.com/topic/113835

Sorry I couldn’t be more help… I haven’t used Ruby for much DB stuff
yet
although I did use “instant rails” to access MySQL when using the Agile
Web
Development with Rails book and it was painless to setup and get going.

Michael

Okay I’ve decided to start from scratch,… again. It’s the start of a
new week and I’ve got a positive attitude so here we go. I read this,
http://www.kitebird.com/articles/ruby-dbi.html, and wanted to try the
first test script. When I do, I get the following error.

C:\PROGRA~2\APACHE~1\Apache2.2\htdocs\dbi-scripts>simple.rb
lib/rational.rb is deprecated
C:/Ruby/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/handles.rb:12:
warning: optional boolean argument is obsoleted
C:/Ruby/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi.rb:300:in block in load_driver': Unable to load driver 'Mysql' (underlying error: uninitialized constant DBI::DBD::Mysql) (DBI::InterfaceError) from C:/Ruby/lib/ruby/1.9.1/monitor.rb:201:in mon_synchronize’
from
C:/Ruby/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi.rb:242:in
load_driver' from C:/Ruby/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi.rb:160:in _get_full_driver’
from
C:/Ruby/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi.rb:145:in connect' from C:/PROGRA~2/APACHE~1/Apache2.2/htdocs/dbi-scripts/simple.rb:9:in

Here are the steps I took to get to here.
Fresh install of Ruby 1.9.2 using
http://rubyforge.org/frs/download.php/72170/rubyinstaller-1.9.2-p0.exe
followed by,
gem install dbd
gem install dbi-mysql
gem install dbi-odbc
gem install mysql

There were no errors generated from any of the commands above.

Then from the command prompt I tried to run the simple.rb script from
http://www.kitebird.com/articles/ruby-dbi.html. The contents of which
are,

#!/ruby -w

simple.rb - simple MySQL script using Ruby DBI module

require “dbi”

begin

connect to the MySQL server

#@ CONNECT
dbh = DBI.connect(“DBI:Mysql:test:localhost”, “root”, “password”)
#@ CONNECT

get server version string and display it

row = dbh.select_one(“SELECT VERSION()”)
puts "Server version: " + row[0]
#@ EXCEPTION
rescue DBI::DatabaseError => e
puts “An error occurred”
puts “Error code: #{e.err}”
puts “Error message: #{e.errstr}”
#@ EXCEPTION
ensure

disconnect from server

dbh.disconnect if dbh
end

I’m open to suggestions?

WOW! Thanks for all the responses and please accept my apologies for
venting my frustrations at 1am. You’d think I’d learn my lesson and not
do that after doing this job for so many years.

I wasn’t trying to confuse Ruby and Rails and I understand that the pair
is synonymous to the pair of C++ and MFC. I guess I was just excepting
that it might be an easier way to start a new app. My reason for trying
to test with mysql was just due to my experience with it and it’s
already set up on my machines for development purposes.

I will definitely take a look at the links everyone supplied.

Thanks again.

On 10/4/2010 1:30 PM, Ed Reed wrote:

load_driver’: Unable to load driver ‘Mysql’ (underlying error:
from
gem install dbi-odbc
The above gem commands have typos. They should be:

gem install dbi
gem install dbd-mysql
gem install dbd-odbc

gem install mysql

This is fetched automatically when installing the dbd-mysql gem. FYI.

connect to the MySQL server

puts “Error message: #{e.errstr}”
#@ EXCEPTION
ensure

disconnect from server

dbh.disconnect if dbh
end

I’m open to suggestions?

It’s necessary to download the MySQL client DLL and copy it into Ruby’s
bin directory if you want to use the mysql gem on Windows. I downloaded
mysql-connector-c-noinstall-6.0.2-win32.zip from
http://dev.mysql.com/downloads/connector/c/ and copied the
lib/libmysql.dll file from the archive directly into Ruby’s bin
directory to resolve this issue.

FYI, things are much easier under Linux. :slight_smile: I wonder if it’s possible
for the mysql gem for Windows builds to provide this DLL.

-Jeremy

My mistake on the gem commands. I did use the correct ones with dbd
instead of dbi. I copied the libmySQL.dll and the simple.rb script now
runs correctly. Thanks! I don’t have much to say about the platform. The
client says it needs to run on Windows 7 so I do what I can to meet
their expectations.
I tried another example from the same kitebird.com source. The xml.rb
script produces an error that seems to indicate a bug in the either ruby
or the extensions. I don’t know if I’m still missing something or is
there really a problem that needs to be fixed.

Here’s the output from the command,

C:\PROGRA~2\APACHE~1\Apache2.2\htdocs\dbi-scripts>xml.rb
lib/rational.rb is deprecated
C:/Ruby/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/handles.rb:12:
warning: optional boolean argument is obsoleted
C:/Ruby/lib/ruby/gems/1.9.1/gems/dbd-mysql-0.4.4/lib/dbd/mysql/statement.rb:130:
[BUG] Segmentation fault
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]

– control frame ----------
c:0011 p:---- s:0051 b:0051 l:000050 d:000050 CFUNC :fetch_fields
c:0010 p:0093 s:0048 b:0048 l:000047 d:000047 METHOD
C:/Ruby/lib/ruby/gems/1.9.1/gems/dbd-mysql-0.4.4/lib/dbd/mysql/statement.rb:130
c:0009 p:0040 s:0040 b:0040 l:000034 d:000039 BLOCK
C:/Ruby/lib/ruby/gems/1.9.1/gems/dbd-mysql-0.4.4/lib/dbd/mysql/statement.rb:37
c:0008 p:0019 s:0038 b:0038 l:000037 d:000037 METHOD
internal:prelude:10
c:0007 p:0029 s:0035 b:0035 l:000034 d:000034 METHOD
C:/Ruby/lib/ruby/gems/1.9.1/gems/dbd-mysql-0.4.4/lib/dbd/mysql/statement.rb:34
c:0006 p:0038 s:0030 b:0030 l:000029 d:000029 METHOD
C:/Ruby/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/base_classes/database.rb:96
c:0005 p:0080 s:0024 b:0023 l:000022 d:000022 METHOD
C:/Ruby/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/handles/database.rb:81
c:0004 p:0032 s:0017 b:0017 l:000016 d:000016 METHOD
C:/Ruby/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/handles/database.rb:128
c:0003 p:0106 s:0010 b:0009 l:000714 d:000ca8 EVAL
C:/PROGRA~2/APACHE~1/Apache2.2/htdocs/dbi-scripts/xml.rb:24
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000714 d:000714 TOP

– Ruby level backtrace information

C:/PROGRA~2/APACHE~1/Apache2.2/htdocs/dbi-scripts/xml.rb:24:in <main>' C:/Ruby/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/handles/database.rb:128:in select_all’
C:/Ruby/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/handles/database.rb:81:in
execute' C:/Ruby/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/base_classes/database.rb:96:in execute’
C:/Ruby/lib/ruby/gems/1.9.1/gems/dbd-mysql-0.4.4/lib/dbd/mysql/statement.rb:34:in
execute' <internal:prelude>:10:in synchronize’
C:/Ruby/lib/ruby/gems/1.9.1/gems/dbd-mysql-0.4.4/lib/dbd/mysql/statement.rb:37:in
block in execute' C:/Ruby/lib/ruby/gems/1.9.1/gems/dbd-mysql-0.4.4/lib/dbd/mysql/statement.rb:130:in column_info’
C:/Ruby/lib/ruby/gems/1.9.1/gems/dbd-mysql-0.4.4/lib/dbd/mysql/statement.rb:130:in
`fetch_fields’

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension
libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application’s support team for more information.

On 10/04/2010 04:29 PM, Ed Reed wrote:

My mistake on the gem commands. I did use the correct ones with dbd
instead of dbi. I copied the libmySQL.dll and the simple.rb script now
runs correctly. Thanks! I don’t have much to say about the platform. The
client says it needs to run on Windows 7 so I do what I can to meet
their expectations.

It’s good you made it a little further but too bad your client got sold
on the MS koolaid.

warning: optional boolean argument is obsoleted
c:0008 p:0019 s:0038 b:0038 l:000037 d:000037 METHOD
C:/PROGRA~2/APACHE~1/Apache2.2/htdocs/dbi-scripts/xml.rb:24
C:/Ruby/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/base_classes/database.rb:96:in

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension
libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application’s support team for more information.

My best guess on this is that the mysql gem was compiled against a
different version of the libmysql.dll file. As a result, it may make a
call somewhere that leads to a segfault. I think there might be a lead
in the mysql gem documentation:

http://rubydoc.info/gems/mysql/2.8.1/frames

It mentions that there is a History.txt file available somewhere that
has the major and version number for the MySQL client library used to
build the mysql gem. I don’t have my work system available right now to
look for the file, but see if you can find it in your gem installation.

-Jeremy

The history.txt file for the mysql gem says
“Binary version built against MySQL 5.0.83”
Also it shows a release date of 2009/08/21.

Is there nothing newer than this? An extension over a year old for a
bleeding-edge technology like Ruby seems a little embarrassing to me. I
looked around, I can’t even find the MySQL Connector/C v5.0.83 to try
and solve the problem.

What am I missing here? This goes back to my original question. Where is
all the hype coming from? I was writing CGI apps for Windows using VB6
over 15 years ago and even back then it was a lot easier than this. I’m
willing to get on board but how much non-billable time does a person
have to spend on this stuff?

On Oct 5, 8:58 pm, Ed Reed [email protected] wrote:

The history.txt file for the mysql gem says
“Binary version built against MySQL 5.0.83”
Also it shows a release date of 2009/08/21.

Is there nothing newer than this? An extension over a year old for a
bleeding-edge technology like Ruby seems a little embarrassing to me. I
looked around, I can’t even find the MySQL Connector/C v5.0.83 to try
and solve the problem.

There has been no updates to mysql “gem” because the extension author
(the C code the gem wraps for Ruby users) hasn’t been updated since
last year.

The reason for that: author declared it dead long ago. He invested
time in ruby/mysql extension instead:

What am I missing here? This goes back to my original question. Where is
all the hype coming from? I was writing CGI apps for Windows using VB6
over 15 years ago and even back then it was a lot easier than this. I’m
willing to get on board but how much non-billable time does a person
have to spend on this stuff?

Seems to me you started on this with the wrong foot. Learn a framework
and a language at the same time is a daunting task that requires
patience and time.

If you, your client or your company are willing to invest on that no
matter – what framework or language we are talking about – will be
considered a waste of time.

On 6 October 2010 08:40, Dave H. [email protected]
wrote:

Now, everything comes in pieces, and you have to snap it together yourself, and there’s just so much more opportunity for things to not fit together correctly.

Rails originally started out as being (very) opinionated (not so much
nowadays, esp. since v3). You used the stack it provided and built
your app in a certain way. That has changed quite a bit now, but much
of it still applies. That’s where the thing about ‘legacy’ databases
comes from. If you’re using a database that doesn’t fit the Rails
mould it’s most likely to be an old, legacy database. If you
intentionally don’t use the Rails mould and create a db in your
mould, then there’s not a lot of point in using Rails because its
strength is in its opionionatedness and it’s probably worth
investigating the alternatives.

This interview with DHH gives some insight into this thinking:

Charles

Thanks for the extensive reply Dave. I certainly appreciate it.

I spent a lot of time last night looking at all the pieces that need to
be ‘snapped together’ to get, what I think should be, a simple db cgi
app to work and I just can’t figure out how it can be worth it. I
appreciate your’s and everyone else’s sentiments but I need to create a
working project that is stable and supportable. It needs to work with
databases where a Ruby api will never exist for them, because they’re
not mainstream enough. I would like to test it against other more
mainstream dbs though, so a project like dbi with odbc seems
appropriate. But, I also need to be sure, when the client comes to me
after only six months needing an update, that one of those ‘snapins’
isn’t gonna be considered a ‘dead project’. I don’t see how people can
work like this. It’s unacceptable to say that Windows is a difficult
development platform. Over 90% of all businesses are small businesses
and most small businesses don’t have the budget or knowledge to setup
and maintain a linux backend. I don’t wanna get into an OS war here,
there’s no point to it. Small businesses use Windows, period. 90% is a
number that is too huge to ignore.

I will do as you suggest and explain what I’m trying to do instead of
talking about what I’ve done and maybe I’ll get some suggestions. At
this moment though, I think Ruby and I are a ‘dead project’

Thanks again to everyone.

On Oct 5, 2010, at 16:58 , Ed Reed wrote:

What am I missing here? This goes back to my original question. Where is
all the hype coming from? I was writing CGI apps for Windows using VB6
over 15 years ago and even back then it was a lot easier than this. I’m
willing to get on board but how much non-billable time does a person
have to spend on this stuff?

I sympathize. I actually decided to learn Ruby just a few months after
Rails was first released, so I’ve been programming in Ruby for years.
However, I’ve been using it for OS apps, not web apps. Earlier this
year, I finally had a chance to do some web dev, and I rubbed my hands
together. “Oh, boy, I finally get to use Rails! I’ve heard it’s really
fabulous! This ought to be really fun!”

Alas, no, it was really quite a nightmare.

Part of the problem is that once upon a time, middleware was
comprehensive. Active Server Pages or Tango or SilverStream or
WebObjects, by necessity, had to include everything you needed to go
from database to web server. With Tango (the platform I used heavily
back in the mid '90s), I needed a working ODBC connection to my database
(SQLServer), and a web server (IIS or WebStar), and Tango. That’s it.

Now, everything comes in pieces, and you have to snap it together
yourself, and there’s just so much more opportunity for things to not
fit together correctly.

My current web-app environment is PostgreSQL for the database, Apache
&/or Mongrel &/or WeBrick for the web server (I really don’t understand
that part yet). The ODBC driver has been replaced with some postgres
libraries and the pg gem. Tango has been replaced with
Ramaze&Sequel&(mumble). “Mumble” was originally HAML, but in the end I
just scrapped the entire idea of using a templating engine because I
couldn’t stand the limitations, so now (mumble) is some custom code I
wrote for myself.

I don’t think this relates to your problem, but just to give you an
example of what can go wrong: I already had a working PostgreSQL server
to connect with, but when I tried to install the ‘pg’ gem so that Ruby
could communicate with it, the gem refused to compile because it needed
to link with some Postgres library files. Well, I had a local copy of
Postgres. So I patiently explained to the gem where it ought to be
looking.

Once it had installed, then I tried to use it. No joy there: it was
completely broken. It took me about three days to finally fix the
problem. I’d installed Postgres under Mac OSX 10.4, but now I was
running 10.6, and Apple introduced huge quantities of 64-bit code with
10.6. The pg gem had been entirely uninterested in installing itself as
a ‘universal’ build, and since it was trying to be 64-bit only, it was
unable to link to the libraries. When I ‘fixed’ it, which meant making
it build as a 32-bit app, then all my OTHER gems were broken, since I
was now trying to mix different architectures. I eventually managed to
get Postgres correctly rebuilt in a true multi-architecture format, but
I wrote at least three email messages far angrier than yours sounded. (I
just didn’t actually send them to anybody. {chuckle})

I then spent yet another whole day trying to get Rails to work. I’d
heard such glowing praise for Rails that it took me that long to realize
that it was utterly unsuitable for my web app. This roadblock of mine
might apply to you as well. I had a very clear idea of what I expected
DB<->web middleware to do, and Rails just plain didn’t do it. I spent
more time figuring out what the current buzzwords were that matched the
behavior I wanted, pulling down and installing alternatives, and seeing
if they worked more like I expected they ought. I looked at IOWA,
SeaSide, Sinatra, Ramaze, and Padrino, among others. I looked at Sequel,
ActiveRecord, and at least two other ORMs (after figuring out what the
heck an ORM was in the first place and why I would care).

If somebody is young, and doesn’t really have a strong background in
developing for the web, and also doesn’t have any kind of pre-existing
requirements, then there’s a fairly good chance that the Ruby-based
tools will dazzle them. One of the buzzwords that really threw me for a
while was “legacy.” I needed to find an ORM that had strong support for
legacy databases. Mind you, I am developing a brand-new application, and
I can create any sort of schema in my database that I want, which is why
it took me so long to figure out that “legacy” was an important buzzword
for me. Because the apps I’m building are all about the data.

The usual example included with many of these new tools is a
quick-and-easy blogging site of some kind. Blogs have super-simple data
structures. My apps have industrial-strength data structures, and there
is not a single ORM out there that can handle them. (By declaring my db
schema read-only, I’ve been able to extend Sequel enough to get the job
done.)

It sounds like Windows7 is serving the same function for you that my
data structures did for me. It is possible to get everything running on
W7, I’m sure, but as others have already suggested, it’s much more
problem-prone than the alternatives, so you have to ignore all the
chirpy happy voices all over the web that promise you can have a web app
go from concept to launch in a weekend. That happens only under ideal
circumstances, and one of the requirements is a lack of pre-conceived
notions, which I think you, like myself, have.

“How much non-billable time does a person have to spend on this stuff?”
I think, all told, I’ve had to spend about two weeks. I’m still not
sure, because I’ve still got one or two really exasperating malfunctions
that I haven’t fixed. Either I have to make Ramaze quit playing around
with this stupid Mongrel gizmo and hook directly into Apache, so I can
put muliple websites on the same ($)%&@#@ port, by which I mean, port
EIGHTY!, or Mongrel (or Ramaze, or Innate, or maybe WeBrick, I really
haven’t a clue whose fault this is) has to quit f**king up my redirect
URLs by sticking :7000 at the end, which contaminates the proxy/reverse
proxy URL rewrites and causes the redirect to fail. Grrrrrrr!

However, with all that being said, I definitely feel that I’m going to
save more than two weeks of programming time in the long run. (Whether I
can sneak the savings into a billable form is another matter.) I can now
create and edit web pages that contain forms for editing data from my
database with great ease, even when the form contains multiple rows of
data that are connected to the main table data via a many-to-many
linking table, all of which have to be editable on the same form and
written back to the database. Even though I’ve had to write my own code
to do some of the functions that used to be handled by my old middleware
tools, I still expect the total amount of code I’ll have to write to be
about half of what it would have been with the old tool.

In short, yea, at least for me, it was definitely worth it, even though
the amount of time it took to get the tools actually operational was
far, far longer than I’d been led to believe.

By the way, I did eventually post a message not unlike your first one,
and I also got back a lot of useful suggestions and advice despite the
fact that I probably should have gotten kicked in the shins instead.
{grin} I would suggest you might want to try what in the end really
worked for me: Describe what you want to DO, not which tools you’ve
tried to get to work, and let people suggest potential tools for you to
consider. (There are, for example, at least three different Ruby-to-
Postgres libraries, one of which is extinct, but not obviously so. It
sounds like one of the MySQL gems is similar.) There might be an
all-in-one installer available, or somebody might describe some simple
virtualization scheme that you could use to get something up and running
well enough to evaluate it. If you like it, then recreating it under
Windows7 might be easier, since you’d at least know how it was supposed
to look if it’s working correctly.

Tap the hive mind, and save yourself a lot of frustration. Because I
absolutely concur that there’s a LOT of frustration lying in wait for
the unsuspecting developer.

Ed Reed wrote:

I spent a lot of time last night looking at all the pieces that need to
be ‘snapped together’ to get, what I think should be, a simple db cgi
app to work and I just can’t figure out how it can be worth it. I
appreciate your’s and everyone else’s sentiments but I need to create a
working project that is stable and supportable.

That, to me, is the benefit of going with the Rails opinionated
design. Any other Rails developer who comes along to your project in 6
months time will have a head-start on how your code is structured. But I
guess you could say the same about any application design environment.

It needs to work with
databases where a Ruby api will never exist for them, because they’re
not mainstream enough.

But they do have an ODBC connector? Then I’d have thought that ruby-odbc
should work, and there’s a standard plugin
(activerecord-sqlserver-adapter)

It’s unacceptable to say that Windows is a difficult
development platform.

Well I’m sorry, but it is. It’s a total pain. Stuff which is just a
“./configure && make” away in Linux is an absolute nightmare to get
working under Windows.

Over 90% of all businesses are small businesses
and most small businesses don’t have the budget or knowledge to setup
and maintain a linux backend. I don’t wanna get into an OS war here,
there’s no point to it. Small businesses use Windows, period. 90% is a
number that is too huge to ignore.

Then you are free to find a tool which is more suitable to your
environment - MS Access perhaps?

Nobody on this list is really going to give you a hard sell on Rails,
because this is not a Rails mailing list anyway :slight_smile: And finding a
technology which you are comfortable with is obviously a choice which
depends on your particular circumstances.

Regards,

Brian.

Have you installed the mysql client software? The gem only provides
bindings
to this, and without it you won’t be able to connect. Since, as
mentioned
elsewhere you haven’t provided any of your errors, it is difficult to
deduce
what is going wrong. I develop Ruby software across 3 different
platforms,
including Windows, with and without Rails, and find it a rewarding
experience.

Mak

Paul M. wrote:

Have you installed the mysql client software? The gem only provides
bindings
to this, and without it you won’t be able to connect. Since, as
mentioned
elsewhere you haven’t provided any of your errors, it is difficult to
deduce
what is going wrong. I develop Ruby software across 3 different
platforms,
including Windows, with and without Rails, and find it a rewarding
experience.

Mak

I did include the errors in an earlier reply and as I also mentioned
earlier I was able to make a small amount of forward progress which
would indicate that I do have the necessary client software installed.
Unfortunately, since the dbd-mysql “snap-in” is apparently a dead
project it seems pointless to continue down that path and I need to try
a different direction. Not that this was the only issue in the
discussion. The main point was a much more “thirty thousand foot view”
of Ruby DB/CGI app development in general.