I created a gem to help me automate some of the setup work that I doe each time I crate a rails project. This gem uses the 960 grid sistem and generates nice looking flash messages based on ideas put forth by janko.

Install the gem from the command line with:

gem install HarryGuerilla-damn-layout-generators

Generate the default layout, css, and images from the root of your rails project with:

script/generate damn_layout

Portable Apps Logo

Recently I was faced with the challenge of presenting a rails application that I’ve developed at home and in my spare time to my co-workers at my place of work. The problem was that my place of work does not use ruby on rails and are quite strict on letting you install new software. I’m sure this is quite a common scenario

After doing some research online I found a tutorial which showed me how to create a portable version of Ruby on Rails which I could save on a USB flash drive and carry around with me wherever I go. This saved me from having to install anything on my work pc, and allowed me to successfully demo my application.

Word of caution, this will only run on windows.

After the break: how I implemented Portable Apps and added MySQL support.

Continue reading »

This tutorial will show you how to install Oracle 10g Personal Edition on Windows XP Service Pack 2.

Oracle 10g: SQL

I purchased the book Oracle 10g: SQL by Joan Casteel used, for an introductory Oracle class I’m currently taking. Because the book I bought was used, it did not come with the CD containing the chapter exercise files or the actual Oracle 10g program. This was no big deal since the software is available for free online. The following steps will show you how to download the necessary files and install oracle:

PART 1: Install Oracle 10g

#1. First download the Oracle Universal Installer from this link:

http://www.oracle.com/technology/software/products/database/

This may require you to sign up for an Oracle web account which is free.

“Accept” the OTN License Agreement and scroll down to Oracle Database 10g Release 2 this is not the latest version of Oracle, but I downloaded it since it is what we will be learning in class. These instruction will probably be similar if you choose a more up-to-date version, although I have yet to test it out.

Under Oracle Database 10g Release 2, select the link for “Oracle Database 10g Release 2 (10.2.0.1.0) for Microsoft Windows.” Accept the license agreement again and download the link link that says: “10201databasewin32.zip (655,025,354 bytes) (cksum – 1264922025)”

Its a large file, so now would probably be a good time to turn on your TV and watch your favorite show. Come back in half an hour and your download should be done, if you’re lucky.

#2. Unzip the file you downloaded. If you need a program to do this, I recommend WinRAR. WinRAR is compatible with most compression formats and its free and simple to use. If you are using WinRAR simply right-click on the zipped file and select “Extract Here.”

Navigate to the unzipped “database” folder and double click on the “setup.exe” icon. This will launch the installer program.

Screen 1

#3. From the drop-down menu select “Personal Edition (1.35GB)”

#4. Leave the default Global Database Name, and enter a password for your database. This can be anything you choose but the password needs to begin with a character, and be at least 4 long.

#5. Select “Next” to continue. The installer will do some tests to make sure your computer is compatible.

Screen 2

Most computers will fail the Network Configuration requirements, unless you are using a static IP. For educational purposes and the purposes of this class it is not necessary to pass this test. We are after all not using this database to run a website or business.

It is possible that something else went wrong at this point, in which case you will get a pop-up message telling you what needs to be changed. The installer will redirect you to the previous page. Just make the necessary adjustments and try again.

#6. Select “Next”

Screen 3

#7. The installer will then show you all the components it will install. There is no need to do anything special here, so just select “Install.”

Screen 4

Screen 5

Screen 6

After quite some time and several screens you will be presented with the Database Configuration Assistant. IMPORTANT! From this screen you will enable the default user “Scott”, so don’t just blindly hit “OK.”

Screen 7

#8. Select “Password Management.”

Screen 8

#9. Scroll down to the end, and uncheck the user “SCOTT.” Since the default password of tiger can be a security risk, it is recommended that you change it. You can change the password on this screen or do it later. Since its easier to do now than later I recommend changing the password at this time. Once you finish select “OK” to continue.

Screen 9

Once you finish installing, note down the link to isqlplus and isqlplus/dba. You will needs these if you want to use the browser interface to Oracle. You can also use the command line interface, SQL Plus (I prefer this option because it is faster), which is accessible from the Start>All Programs>Oracle – OraDb10g_home1>Application Development.

#10. Finish the installation by selecting “Exit”

Screen 10

To test the installation open up your web browser.

#11. In the address bar enter the url you noted earlier for the iSQL Plus interface.

#12. Enter the username: “Scott” and password (whatever you chose in step 9). Select login and you should be taken to the next page to enter SQL commands.

Since we now have oracle up and running, its time to take a break. When we return we will download the necessary files so we can complete the exercises in the book.

PART 2: Download Exercise Files.

The other files which would have come in the book, had I had the CD that came with it, allow you to set up the database correctly for any particular chapter in the book. Luckily these are available for free online.

Download files from here. (click on the link “83629-xd.exe (54 KB)”)

Once you have the file on your computer double click it and select where to install the chapter files.

Once you have finished you should be set and ready to complete the exercises.

Gnu Emacs & Rails

Recently I’ve been doing a lot of Ruby on Rails development obsessively immersing myself in books to get to know the framework. I’ve gained a certain level of competence, and finished converting my website (except for this blog) to rails. Most of my development is done on my laptop which runs Windows XP. I had originally chosen Rad Rails with Aptana as my Integrated Development Environment (IDE). For those of you who don’t know, an IDE is a program used to develop program code that usually has special features like syntax highlighting, error correction, integrated compiling etc. that make it easier to develop with.

I really liked many of the features of Radrails, which took some of the repetative tasks in rials development and make simplified them. The biggest problem I had with Radrails is its speed. My computer is several years old now, and the program seems to load reeeaaaaalllllllyyyy slowly.

I’ve been known to be a little impatient, so I felt like I needed something faster. If you brows the web, most of the tutorials for rails have been created by developers using Textmate. Textmate is not a free program and only available for the mac. Furthermore, from what I’ve seen, Radrails seems to be nicer, in the fact that all the development tools are in one place and you don’t have to switch between windows constantly. But Textmate is respsonsive and fast. Searching on the Textmate site I noticed that it was influenced in design by Emacs.

The name rang a bell, and I remembered trying to run the program on my Ubuntu desktop and getting frustrated because I couldn’t immediately figure out how to use it. I came across this screencast and though “Wow, That is really cool!” So now it was a matter of downloading the program and installing it!

Well this didn’t turn out to be as easy as I had hoped it would be…..

My Emacs Layout
Click to view my Emacs Screenshot

Emacs is highly customizable which I’ve come to love, but which also makes it complicated to new users. So I’ve spent the whole day figuring out how to work it and customize it to what I need for rails development. Let me share with you what I’ve done:

  1. Install Emacs for Windows. Although you can download the program directly from GNU Emacs, I found the defaults in this installation much easier to work with.
  2. Follow This 5 Step Tutorial. I found this great tutorials after hours of scowring the web, but just getting more confused. It is pretty simple to follow, the only trouble I had with it was getting my folder in ecb to work when I clicked them with my mouse. Turns out its the middle mouse button that you have to press by default.
  3. I find putting line numbers in while viewing my code is helpful, so I also installed setnu.el.
  4. Since Emacs is highly customizable I wanted a simple way to customize views. I found color-theme which did just that

There is still a lot I have to learn about emacs, but I don’t think I will be switching back to Radrails anytime soon. I hope this information helps you explore Emacs and use it for your own Rails development.

Mosaic Web Browser

Read: Safari on Windows? Apple and the Origins of the Web

This article really has to be one of the most intriguing articles I have ever read! It is full of insightful analysis of the potential web applications have when built around an open platform.

For quite some time I have been feeling that we as computer users are moving away from using desktop applications, and into online applications. We’re not quite there yet, but the direction we are headed seems to indicate that web applications are the future. And this makes total sense when you realize that you will no longer have to worry about what kind of operating system you have as long as you can connect to the internet. Take the iPhone for example. Apple has pushed Safari on the iPhone as the platform for application development. By creating a web app you can supply users on Mac, Windows, Linux, iPhone etc.!

I can’t wait to see what the future brings!

© 2011 Tony Pelaez's Blog Suffusion theme by Sayontan Sinha