Devlog :: And Wizardry

Tue, 03 Jan 2006

*More about Ruby and Rails and my DBI install problems...*

Yesterday I mentioned the problems I had installing Ruby DBD/DBI. There's a lot more I could say about that today. First, I doesn't look like Rails needs DBI so getting DBI to install shouldn't have made Rails start working. (Should it?) In fact, a short program to test the DBI function errors out... A more likely explanation, then, is that installing and running mySQL from my own space was what's needed. As a side note - I tried to take this advice at the top of the Rails config file database.yml: [= # Get the fast C bindings: # gem install mysql] but this is what I get: [=Attempting local installation of 'mysql' Local gem file not found: mysql*.gem Attempting remote installation of 'mysql' Building native extensions. This could take a while... ERROR: While executing gem ... (RuntimeError) ERROR: Failed to build gem native extension.] No joy there, but like I said, Rails did start connecting to mySQL anyway. I'll just document my DBI problems and move on. The errors I was seeing are these: [= pwizardry% ruby setup.rb install setup.rb:586: warning: parenthesize argument(s) for future version entering install phase... mkdir -p /usr/home/lyon/local/bin install sqlsh.rb /usr/home/lyon/local/bin install failed Inappropriate file type or format - /usr/home/lyon/local/bin/sqlsh.rb] The file sqlsh.rb was there and ruby -c says [="Syntax OK"] and I don't see anything wrong with the file either. Ah well, I will move on for now. As a scientist I always want to know why but as a Practical Wizard I first want to get it working. One problem for the scientist here is the old "I tried A and B and C and D and ... and then it worked. Was it the last thing I tried? Or was it some combination? Which one? A carefully designed experiment would answer that but that's not next on my task list. ---- [/items/Rails] permanent link