East agile logo ruby red v003_50

 A Mac OS X Snow Leopard upgrade can go badly for Rails developers.

Norbauer provides some advise on fixing mySQL and other elements of the Ruby on Rails development environment that can break when upgrading to the  64-bit Snow Leopard environment. For a full description, see http://norbauer.com/notebooks/code/notes/snow-leopard-upgrading-for-rails-developers.

We have a large number of iMac OS X system on which we develop Ruby applications and were thankful this upgrade advise. Unfortunately, it did not alway address our problems. In those case, we actually found a fresh install was the most effective solution. Developers in the same situation may find the following directions for doing this helpful.

Duc and I tried to upgrade to Snow Leopard and to our surprise, it did not go very well. As a last resort, we had to make a fresh install of the OS. One shouldn't have to do this, but in case somebody needs to, here are the steps that I noted down:

 
--- Restart the machine with the the OS DVD, before you start the installation, click on Tools-> Disk Utility, Erase the hard drive. (If you don't do this step, you have have an upgrade system) Then go back to the installation process.
 
Here are some quick notes to set up development environment:
 
--- Install Xcode package from the DVD

--- Install 64 BIT Mac version of mysql package from mysql.com

--- Set sticky bit for /private/tmp/ (Prevent normal user to detele the /tmp/ folder which contains the mysql.sock)
chmod +t /tmp


--- Add path to mysql folder:
Put this into ~/.bash_profile
PATH=$PATH:/usr/local/mysql/bin

--- Check mysql socket location:
mysql_config --socket

--- Fix mysql.sock for PHP:
sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

Test mysql.sock:
mysqladmin --socket=/path_to_socket_file/ version

--- Installing Ruby:

Xcode come with some basic gems and you cannot remove these gems. Of course you can upgrade to newest versions.

sudo gem update --system 
sudo gem install rails 
sudo gem update rake 
sudo gem update sqlite3-ruby

Because SL is a 64 bit, you have to install mysql gem for 64 bit architecture

sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

This should get you ready for PHP / RoR / Mysql dev.
 
Cheers,
 

 

Tri

 

 

 

 

I'm thinking of building a Ruby on Rails based micro-multinational accounting system. It's the last thing I want to do, but it seems like nothing else free or paid out there is adequate.

 
Currently, we make do with Intuit Quickbooks Pro. Compared to the alternatives, it is a pleasure to use, and makes accounting rather easy. But it has a number of fundamental failings from our perspective, and I can't find an alternative that addresses them.
 
Missing Essentials
 
(1) multi-users with appropriate permissions
(2) remote access from anywhere
(3) dealing with multiple currencies
(4) ability to create custom features and interfaces to deal with special regulations, processes and access to information for other related systems (like analysis and reporting).
(5) can be hosted on a remote server
 
Nice to Have
 
(1) consolidated accounts. We run companies in many countries and jurisdictions. It would be good to have them all consolidated in realtime with a single combined view of cash, revenue, expenses, assets, and liabilities, etc.
(2) runs on a unix system (linux, mac OSX, solaris)
(3) works via a web browser.
(4) integrate with other open systems, such as Evernote, Highrise.
(5) runs on the cloud and/or in a Virtual Machine
 
Getting these missing essentials and nice-to-have features can't come at the cost of ease of use or reasonable cost. I looked at some open ERP systems that promise everything I want (like openerp.com), but they still have clunky interfaces for inputing accounting information, and their broad focus makes them hard to manage, understand, and modify. Other systems, like Quickbooks online, look simple and easy enough to use, but have no ability to be modified for our other uses since they are closed.
 
Of course, building our own system won't be cheap; we would have to find a way to recover some of those costs by commercializing it or getting some sort of spin-off effect such as more clients.

Identifying Ruby on Rails Sites

Posted by Lawrence Sinclair on 15 Aug 2009 at 05:40

Can you tell if a site was implemented using Ruby on Rails? It is not always obvious. But there are clues that you can use. One of the East Agile developers shares the following advise on this topic.

Based on my experience about rails and web technologies, I have some rules to identify the technology behind a website:
- recognize by URL pattern
- view HTML source
- HTTP monitor by Firebug
- recognize it's not rails-based by understanding other platforms

Basically, I give you 2 simple approaches. To take advantage of these, you may need an understanding of some web technologies and you may need to install more tools. 

1. URL pattern:
   - rails-based website usually does not have those file extensions in URL: php, asp, aspx, do, jsp, ...
   - Rails supports RESTful URL build-in. So URL in rails usually in patterns:
      //new         --> new item page
      //        --> detail page of an item
      ///edit   --> edit an item with id
      /             --> list all items
      ///collection>
     ...
      may be *products*, *users*, *projects*
     Ex:
        /projects/1234/stories    --> all stories in project with id 1234
      /products/new             --> new production page
      ...
2. HTML code: 
    - open a page that has a form (eg: new products page, guestbook page, user registration page ...)
    - view HTML source: (menu View->Page Source in Firefox)
    - find HTML tag

(in FF: press command+F, type  - include less than symbol)
    If the website is developed with Rails technology, you may found those things after the tag:
    -  authenticity_token:
     
<input name="authenticity_token" type="hidden" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
    - field name convention: you may found: model[model_field_name] in the 'name' attribute of input tag:
    
    

An important thing to note: these steps do not prove if a website uses the Rails platform or not.  

Copyright 2010 The Stanyan Group