05.3.11

Uninstall Flash Builder 4.5 Burrito (and more adobe things)

When I tried to install adobe flash builder 4.5 final, I found a problem that it complains about having burrito (the pre-release) version of 4.5, I run the uninstall included in the burrito dmg but points me to an “adobe application manager” … to keep it short, it didn’t work.

The real deal is here

http://www.adobe.com/support/contact/cscleanertool.html

Just uninstall the flash buider and you are good to go

Happy coding :)

.

04.29.11

Rails 3 STI

I was doing an ETL for a client, and I get into the issue of defining a way in the DB to define “tasks”, the main issue here is that many tasks have similar fields, so its useless to get them on different tables, a good friend told me about Single Table Inheritance , it was very useful and proved to work.

I decide to do an example of this, in Rails3 for sharing, the idea is basic, you have different tasks, right now it only have a mysql task, and a ftp task, in a very simple scaffolded app.

The interesting things get in the model, and the controller, you can see how the STI magic happens, I leave a lot of comments and links on the code, to better understand this.

I will update it to get more useful information on the github example, you can download it from here:

https://github.com/warstories/TheTasker

.

09.26.10

Rails 3 on Mac OSX Snow Leopard

I used to work with rails 2.3.8 and I wanted to know all the buzz around Rails 3, everybody knows that it’s a new development beast.

So I decided to install it and after a lot of digging on the internet, I managed it to install it, one requirement for me its that I *need* both RoR running, so I go with the RVM approach, and even without this requirement, it’s the recommended approach (not by me but recommended by a good friend and a real ruby/ror expert).

Why RVM ? for certain gems you will need ruby version 1.9.2 (1.9.1 has known bugs, and rails will throw you a warning if you choose this), and the snow leopard version is 1.8.7, so you will need this. Explaining RVM goes beyond the scope of this tutorial, so I will recommend you to read the basics from the RVM page and also this tutorial of a good friend.

1. Before you start be sure that you have the xcode tools at least on version 3.2.1 (1613) you won’t be able to do anything without this, so go ahead to developer.apple.com and grab it, its a little big (2.9 gb the current version), so you better start right now.

2. You will need git and curl, so I recommend you to use macports, but you can also install it from different sources

3. Install RVM, the instructions are very strightforward and almost a copy & paste from this page, but I will wrote the commands here, just to make it as complete as possible

  • bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )

4. Configure RVM, this is open your .profile (this is the apple recommended, but if you override this, and used bashrc you will add it there), and then write this line at the end of the file (if you are a linux user and you are here for coincide please see the RETURN issue on the install page, specially ubuntu/debian ones)

  • [[ -s "$HOME/.rvm/scripts/rvm" ]] && source “$HOME/.rvm/scripts/rvm”  # This loads RVM into a shell session

After adding this, you know the steps, load a new console, and you can test it whit this command

  • type rvm | head -n1

It *have* to return “rvm is a function” otherwise, please refer to the troubleshooting section of the RVM install page.

5. Now, time to install ruby 1.9.2.

  • rvm install 1.9.2

6. Once is installed you can switch to this version with this command

  • rvm 1.9.2

you can check the installed version with

  • ruby –version

7. Create a new gemset (read more about gemsets here)

  • rvm gemset create ror3

Switch to this gemset

  • rvm gemset use ror3

8. Before installing the rails gem, you need 2 gems, rdoc and rubytree, otherwise the installation will fail

  • gem install rdoc rubytree

9. Now install rails

  • gem install rails

10. Bonus track, some commands don’t work well without this gem, install it also

  • gem install sqlite3-ruby

And you are done!!! Happy coding :D

.

09.24.10

Ruby 1.9 and 1.8 on ubuntu 10.04

After asking a lot of people , and trying to go with the ubuntu way, a.k.a. synaptic I realized that the best way to install ruby on ubuntu is to avoid the ubuntu solution, it doesn’t get a lot of flexibility, and you may get in troubles when you want to do a strange thing.

So I advice you, to install RVM, and go this way, you will find a great tutorial on how to install it on ubuntu

http://rbjl.net/19-rubybuntu-1-installing-ruby-and-rails-on-ubuntu

also a great friend do a kick start tutorial on RVM here

http://blog.crowdint.com/2010/07/28/getting-started-with-rvm.html

Happy coding :D

By the way, if you are trying this to install RoR3 be sure to install first the following gems rdoc , test-unit and rubytree or you will get errors like this:

ERROR:  While executing gem … (Errno::ENOENT)
No such file or directory – lib

ERROR:  While executing gem … (Errno::ENOENT)

No such file or directory – lib

09.6.10

From flex to ruby on rails; A kickstarter guide

First, be calm, you will miss the canvas object like your girlfriend on a business travel, sooner or later you will remember that you had been there, and she has to return.

I recommend you to use RadRails you will understand it a lot because is eclipse based, like Flex Bulider, an it has a pretty good debugger with breakpoints and all that stuff.

You probably already have it, but I also recomend that you keep using charles proxy (and if you are not using it on flex, shame on you!), also install the firebug extension for firefox, if you are a safari man enable the developer menu

I know that you probabliy have to start with RoR without time of reading a book, I recommend you this few pages, first this getting started guide, also a page about migrations, and also about generators, and if you had time this book will help you a lot The Rails way

Now, find yourself a new life, and open a github account, you will realize that the ruby community is mostly git based.

Forget about CammelCase, and start getting used to snake_case you will notice that is a minor but useful change.

Keep the terminal in your dock if you are using mac, if you are using linux you probably had one opened, and if you are using windows consider seriously migrate to linux, your life will be easier that way.

Get used to the idea to deal with javascript, but you don’t have to do it alone, use jQuery.

And finally when you are ready to leave your training wheels (rad rails) and move to TextMate don’t forget this two bundles: RoR bundle and git bundle

Anyway I think this links would help you, but If you had another one you want to share, please add it on the comments, I will be happy to include them.

Happy coding.

Tags: , ,
| Posted in RoR, development, flex | 3 Comments »
02.3.09

Json Navigator

Hey guys, to complement my other post of the json validator, here is the json “Navigator” (netscape anyone?), it’s very useful for anyone dealing with complex structures. 

http://danml.com/pub/jsonBrowser.htm

01.8.09

Json Validator

I’ve found a very useful json validator, specially when you are like me and forget to put the ” in the objects

http://www.jsonlint.com/

  • hp support 2133
  • new england patriots 50
  • bengals 08 schedule
  • searchbugsearch engines
  • randy moss autograph
  • chicago bears 09 draft
  • dis lyrics
  • pedals
  • bengals for adoption
  • new england patriots espn blog
  • chicago bears tattoos
  • vince young uncle rico gif
  • hp support 6500a plus
  • chicago bears number 17
  • connecticut quarter error
  • avenue
  • new england patriots 1996 roster
  • augustine
  • battleship vittorio veneto
  • mtv american idol
  • cspan kucinich
  • chad ochocinco vs skip bayless
  • connecticut 104.1
  • cspan ap government review
  • connecticut 30 news
  • connecticut lottery
  • new england patriots 65
  • heidelberg
  • tea party birthday
  • hp support monitors
  • new england patriots rumors
  • randy moss wallpaper
  • search engines internet
  • new england patriots jake locker
  • mtv rivals
  • dist 95
  • search protocol host
  • zara phillips royal wedding picture
  • hp support center
  • bellsouth
  • greg olsen football
  • bengals job fair
  • discjuggler
  • tea party 8 28 09
  • bengals history
  • dis v44
  • vince young 10 11
  • battleship classes
  • hp support contact number
  • mtv cartoons
  • search vim
  • hp support greece
  • connecticut natural gas
  • search 2.0
  • new england patriots store
  • zara phillips wedding plans
  • di's hallmark
  • zara phillips wedding date
  • c span youtube obama
  • vince young z
  • dis systems
  • randy moss bio
  • beau coup
  • search in vi
  • connecticut quarry
  • configuring
  • tea party zombies download
  • bea rims
  • cspan hosts
  • chicago bears garter
  • mtv 25 lame
  • bea zuberbühler
  • la ink 04x01
  • tea party young people
  • vince young 2008
  • hp support error 1005
  • vince young yahoo stats
  • greg olsen 2009 calendar
  • lilburn
  • hp support greece
  • search engines 9
  • zara phillips kids
  • dis n dat band
  • needles
  • hispanic
  • randy moss university
  • stefani
  • vince young jersey texas
  • peek
  • battleship kirishima
  • bea verdi
  • battleship aurora
  • tea party nj
  • search engines rankings 2011
  • bengals football
  • greg olsen vikingsgreg olsen wife
  • search 4
  • brugge
  • search engines before google
  • primer
  • chicago bears schedule 2011
  • freida pinto green dress
  • la ink price list
  • chad ochocinco traded
  • connecticut 7 day weather forecast
  • zara phillips tongue
  • hp support id
  • recoil
  • chicago bears gifts
  • cspan government shutdown
  • battleship texas hours
  • search 78search 800 numbers
  • applebees
  • hp support driver downloads
  • impairment
  • greg olsen boulder
  • hp support helpline
  • mbna
  • duggan
  • la ink tattoos
  • sheetmetal
  • new england patriots xxl
  • greg olsen twitter
  • morris
  • freida pinto 1995
  • tea party ribbons
  • hp support chat
  • cspan question timecspan radio
  • randy moss jail
  • cspan washington correspondents dinner 2011
  • zara phillips husband
  • beagle
  • freida pinto chanel
  • chicago bears training camp
  • alum
  • connecticut post
  • hp support center
  • greg olsen mormon
  • vince young dadvince young eagles
  • dis tester
  • randy moss height
  • randy moss 98 vikings
  • cooling
  • zara phillips and the queen
  • la ink upcoming episodes
  • 4pm cspancspan area 51cspan 90.1
  • new england patriots 80
  • dis 2012 conference
  • hp support 6310hp support 7200
  • beta
  • tea party medicare
  • vince young released
  • deflector
  • chad ochocinco free agent
  • search 5500
  • zara phillips baby
  • freida pinto can't act
  • hp support error 1005
  • chicago bears zip hoodie
  • chicago bears football club
  • bea 460 bosch
  • addiction
  • cspan streaming
  • acdc
  • freida pinto miral
  • trojans
  • mtv jams
  • kimberly
  • search engines 2008
  • cspan goldman sachs hearingcspan history
  • freida pinto jeansfreida pinto kissing
  • cadet
  • hp support hard drive replacement
  • bea goldfishberg
  • connecticut law tribune
  • vince young status
  • chicago bears jewish players
  • bear gryllsbea hive dance studio
  • search engines images
  • dis poem
  • connecticut transit
  • bloods
  • search cfisd.net
  • dist 91
  • feeders
  • bea 4603