Ramblings

May 27, 2010

Ruby, OS X, MAMP, MySQL, do_mysql and getting it installed

Filed under: install, mysql, osx, ruby, tip — michaelangela @ 7:33 am

This took a lot of time. In hopes that this will help someone else, I add this link.

How to install the MySQL/Ruby gem on Mac OS X Leopard

Here’s the situation. I have MAMP. For legacy reasons my current MAMP 1.7.2 is in a custom directory. I use ruby. In particular I wanted to use DataMapper in a project with ruby. I wanted to use it with MySQL. That requires do_mysql. It just would not install with all kinds of errors. Well one in particular. It complained of possibly missing headers or libraries. After a long search the above link surfaced from the depths of Google. It almost worked for me. Everything but the last command actually. So for me, the command I ended up using is something like:

sudo env ARCHFLAGS=”-arch i386″ gem install mysql — –with-mysql-dir=/Applications/MAMP_1.7.2/Library –with-mysql-include=/Applications/MAMP_1.7.2/Library/include/mysql –with-mysql-config=/Applications/MAMP_1.7.2/Library/bin/mysql_config

This is OS X 10.5.8 Leopard

October 16, 2008

Remember to check your emoticon path for Expression Engine!

Filed under: automation, expression engine, ruby, tool — michaelangela @ 5:50 pm

Getting ready to move a site from dev to production. I often use Charles just to make sure paths are doing what they are supposed to do. I had done an initial test moving from localhost to an actual IP address just to run through the process. I got everything except emoticons and it took a little while to track it down:

Expression Engine Migration Notes | WikiLab Notes

go to Admin > SYSTEM PREFERANCES > Emotican Preferences

Voila. Problem solved. To aid with this sort of thing in the future, this older post has some very helpful tips.

Configuring Expression Engine for multiple servers

The one remaining problem is that, upon installing EE, it hard-codes your site URL and application installation path all over the place, from config files to options stored in the database. This is what makes Expression Engine so unportable — moving from one server to another, say from development to production, requires updating this URL and path information in literally about a dozen places.

To aid with this process, a kind soul has written this ruby script:

Migrating ExpressionEngine from development to production – deeden.co.uk

I’ve never succeeded in migrating successfully using the manual method. I always miss something and have to deal with some small problem that inevitably crops up. Finally, I decided to make it easier on myself, so I wrote a script to perform the update for me. This will not be for everyone, however if you’re comfortable with command line scripts and ruby this may do the job for you.

I haven’t tried the config method or the ruby script yet but it’s good to know.

March 28, 2008

Functional Testing for Flex

Filed under: cool, dev, education, flex, functional testing, ruby, tool — michaelangela @ 12:29 am

I don’t know how many times something broke in my flex app and I didn’t know because I didn’t test that bit after updating some code. I have been reading about test driven development, behavior driven development, and most recently “functional testing”. This bit is harder because it’s emulating a user actually using the system.

Enter FunFX

.::FunFX – Functional Testing of Flex applications

FunFX is the only free alternative to achieve functional testing of Adobe Flex applications.

Open-source and uses Ruby

FunFX is open-source and uses Ruby to write tests. Ruby is a simple but yet powerfull language, which makes it possible to write tests that are easy to understand. Ruby was whosen due to its DOM capabilities and the fact that it is a scripting language.

FunFX has used Watir, a great testing tool for web applications, as a model on how to write the tests in Ruby.

FunFX is created as a framework that will enable you to drive a Flex application through a web browser. FunFX together with for instance Test::Unit or rSpec creates a great to for testing and asserting the functionality of a Flex application

It only works on Windows, and it only works with IE, and it’s Ruby so there is a little learning, but not too much for what needs to be done. The idea is you can have it actually run through and click buttons, etc., and make sure things are working right. That’s pretty sweet.

This doesn’t work with all versions of Flex though. I believe you need the Pro versions to do it. But the idea… nice.

It makes a wrapper of all your UI elements, stores it in an XML file that the ruby reads and uses a bridge that is also generated to communicate with the Flex app. I haven’t looked too deeply into it but I am guessing there is a bit of Actionscript/Javascript communication happening here. Good concept though!

March 25, 2008

Pure Ruby port of Lucene

Filed under: dev, ruby, tool — michaelangela @ 10:03 pm

This doesn’t use Java. In fact, it’s possible to use this instead of Lucene?! :-P

Ferret – Trac

Ferret is a high-performance, full-featured text search engine library written
for Ruby. It is inspired by
Apache Lucene Java project.

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.