Rails Playground Rocks

Posted on December 31, 2007

I have been hosting many Rails applications in many different "SHARED" Hostings. and all I can say is that the best of them is Rails Playground...

Here are my reasons:

1. Uptime is very good.

05:38:15 up 108 days, 9:56, 7 users, load average: 0.46, 0.46, 0.45

2. Load is very Low

Load average: 0.46, 0.46, 0.45

for 2 x dual core cpus, this load is Awesome. The maximum load I have seen is like 1.9

3. Service is excellent

Every email I send I get the answer right back, with a good solution and help.

4. I asked for Git support

and I got it, they installed git right away.

5. FAST Hardware

in my rails application I get between 100 to 200 Req/sec using a single mongrel. I even get near results using FCGI !!! of course my app uses a LOT of caching, as well, using rails 2.0 edge from trunk. you might not get same results...

6. Fast connection

They have resonably fast connections... From the the other side of the world (Japan, Thailand, Malaysia) I get real good speed.

7. Free 2 mongrel Instances

I get 2 mongrel for the developer plan.

8. Free 1GB subversion repository

if i had to pay for http://svnrepository.com/ it would cost another 5 USD month.

9. All newer gems

On my machine, 76 gems installed. well updated.

SVNrepository.com is a real good choice to pay if you need more space to host many applications and more support.

So, for for the newbie and junior Programmer, RailsPlayground is definitely worth it for the "price".

Disclaimer :

IT IS JUST MY PERSONAL OPINION, for a shared Hosting I don't guarantee you will get the same service as I get. you might not get same results as I get... basically, you might not be lucky as i am. :)

NOTE:

If you have a critical application I do recommend to host on AMAZON EC2, or get your own Server Stack or Clusters.

Multi Search with Ferret, Pagination and Sorting

Posted on December 28, 2007
I had to do a search with ferret for a single model and multiples queries, plus sorting in pagination.
for example, I wanted to search for a User with name="John Smith" AND city="atlanta" AND state="ga" AND zip=100*

here is my implementation

The model code, I got it from Igvita Ferret Pagination in Rails and slightly modified.

OSX Leopard Sux big time

Posted on December 20, 2007

This brand new OS, “The most advanced OS” sucks big time!!!

This OS is so damn unresponsive. it hangs all the time… i hate it.

(Update 10.5.2 doesnt hang anymore)

- Mail hangs, when I send email, search or read

- iTunes hangs, (becoming unresponsive)

- Safari hangs, and takes all my ram… up to 800 MB!!!

- The terminal console is lagging… and crashing. iTerm also becomes unresponsive.

- even textmate is crashing, not because of the textmate, but because of the OS.

It all happened after I installed Leopard..

TIGER WAS FINE….

I bought this DVD, 130 USD

and what I get??? this shit.

now I have to go back to tiger.

Use TIGER until apple fixes Leopard.

Use TIGER and wait for Snow Leopard (10.6)

Some Solutions:


Use OSX Tiger.
Use Firefox or Camino,
Use Thunderbird as mail client.


Update:

10.5.4 came out and still sux :-P

Faster Rails auto_complete with memcached

Posted on December 17, 2007

Auto_complete by default uses full text search to the database.

That can be very slow if you your database is big...

so, let use memcached instead.

Encrypt folders in Mac OSX with encfs

Posted on December 17, 2007

OSX already include the File Vault functionality that allows you to encrypt your whole Home Folder. Thou the storage overhead is so small, the time to encrypt it the first time is very very long. if you have Videos, and big files, it takes even longer.

What if I don't want to encrypt my big folders like Movies, Music, Pictures, Pdfs?

Make your Rails app faster with memcached. Part 1

Posted on December 13, 2007

. Make your Rails app faster with memcached. Part 1

In this article I describe how to make your application increase considerably in performance

Required Applications:

    1. cache_fu (plugin)

./script/plugin discover ./script/plugin install cache_fu

    1. memcache_client

gem install memcache_client

    1. memcached

(http://www.danga.com/memcached)

Upload daily mysql dumps from EC2 to S3 bucket

Posted on December 07, 2007
here is how I upload a daily mysql dump to S3 bucket

Capistrano 2.1 and Ultrasphinx

Posted on December 07, 2007

This Article is very much outdated.

Please Use this plugin: git://github.com/ruberion/ruberion_server_tools.git
or go to github and search for capistrano. ;)


*****
Here is my capistrano configuration to use with ultrasphinx. Sphinx on gentoo. The default.base is very important. When you run rake ultrasphinx:configure, the new configuration file will be base on this default config file.

Upload and Download Gentoo portage to S3

Posted on December 07, 2007
Often I have to load and unload EC2 ami. As well I keep gentoo portage in /mnt/ since it's quite big (550MB) so I have a ruby code to update the portage, make a tar file and upload it

Search with ferret using will_paginate

Posted on December 07, 2007

I love Sphinx search, but most shared hosting won’t have sphinx…. Sphinx returns the results already “will_paginated” :)

So I have to use my second most favorite indexing tool, acts_as_ferret.

Bash Profile in OSX (.bash_profile)

Posted on December 03, 2007
The console terminal in OSX ain't too good looking... so, here is the .bash_profile for my OSX.
It includes dir colors and bash history auto completion ( when you start typing the word and press arrow up to complete with older commands, like Linux page_up style) .bash_profile save it as ~/.bash_profile (add the dot in front)

My /etc/DIR_COLORS file :

DIR_COLORS