Things that suck about your MacBook Pro that no one will tell you about

I have a Core Duo model and am running windows (w/ bootcamp), so some of this stuff probably doesn’t apply but …

1. The hard drive is painfully slow. When you go to delete something, you can sit there for a good 5 seconds before the delete dialog is gone

2. You can only run an external 2.5 inch hard drive off one particular USB port (the one to the right) … if you put it on any other port, it will not get enough power and be stuck powering up then powering down. Or it will power up and stay fine for a bit, until it suddenly starts experiencing the situation I’ve described.

3. Maximum installable RAM … 2 Gigabytes.
god.

4. While you can get up to 4 hours of power running OS X on the battery … you’ll barely get 2 hours running Windows.

note: This is a late night rant … I love my darling MacBook Pro.

Add comment May 25th, 2008

Ruby on Rails gotcha: undefined method `rewrite’ for ….

undefined method `rewrite' for "":String

If you get this error, and the error message is pointing you to a “link_to” call or something similar, then you may be using an instance variable that’s called ‘@url’ too.

This blog post did talk about the problem but it seemed limited to models only. I finally discovered that, in my case, I was using ‘@url’ in the controller for the view where I was making the ‘link_to’ call.

Long story short, if you see this error, comb through your code (models, controllers and views) for any variables that are called ‘@url’  and change them.

Add comment May 16th, 2008

Dreamhost now supports mod_rails on their shared hosting plans

Dreamhost now supports the use of mod_rails on their shared hosting plans

The Phusion team contacted me with a working test version of Passenger a couple of months ago and since then DreamHost has been helping out with testing and ironing out lingering deployment issues.  The Phusion team has been very helpful and responsive throughout the process and I think we will see a lot more great things from them in the future.

Now to the important part… how do you use Passenger on DreamHost?

Briefly, all you do is enable the Ruby on Rails Passenger (mod_rails) option for any existing or new web domain in the DreamHost web control panel. When you then point that domain’s web directory to the public directory of an existing Ruby on Rails application it will work automatically.  For more detailed information, check out our Passenger wiki page.

Add comment May 14th, 2008

Bad system call … cygwin apache2/httpd2 error message …

I ran into a “bad system call” error while trying to run Apache2 on cygwin.

I had installed Apache 1.3 and Apache 2 using cyg-apt, but when I went to start the Apache 2 server, I kept getting this error.

apache2 on cygwin: Bad system call

(more…)

1 comment May 8th, 2008

Safari on windows uses almost 500MB of Memory!!!

Insane!

Safari on windows uses almost 500MB of Memory!!!

Add comment May 3rd, 2008

php’s print_r equivalent in ruby on rails

I was going through my google analytics logs today and I noticed that a lot of folks were coming to my site on Google searches for stuff like ‘print_r + ruby on rails‘.

So I figured I’d write a blog post about it, because I’ve had the same problem.

(more…)

Add comment May 1st, 2008

Gotcha in Ruby for PHP Developers with multiple assignments of array to variables

The more I work with Ruby and Ruby on Rails, the more I begin to understand (though not necessarily agree with) a lot of the vitriol that has been aimed at PHP over the years by developers using other more rigorous languages.

A few weeks back I ran into this little speed bump while working with Ruby on Rails, where I was  trying to do a multiple assignment like this

x = y = z = []

Most seasoned Rubyists will be waving their arms around and yelling “NOOOOOO!!!”
But coming from a PHP background this seemed perfectly okay to me.

(more…)

Add comment April 29th, 2008

Ruby on Rails: How to get the output from an action (render_component_as_string)

This one took a little bit but I finally figured it out …

@xml = render_component_as_string :controller => “quote”, :action => “xml”, :params => {:request_id => 100}

This would run the action “xml” of the controller “quote” and pass the parameter  “100″ to it to do so.

Whatever would have been displayed at /quote/xml/100 is now stored in @xml

This allows you get the output from any action …. anywhere, also allowing you to pass parameters to it in the process.

Even better, this actually runs the action and its view (unlike render :action, which just renders the action view).

For more details, go to the Ruby On Rails Manual > Using components

Add comment April 17th, 2008

Getting started with mod_rails/mod_rails tutorial

I have been unable to play around with mod_rails (the apache module that allows you run Rails apps in apache) and write a “mod_rails 101″ type blog post.

However, I came across this excellent mod_rails tutorial on how to get up and running.

Just thought I should share.

getting started with mod_rails tutorial

Add comment April 16th, 2008

Apache Mod Rails released!!!

After weeks of anticipation , the apache module that allows you to upload your ruby on rails application to the server and have it “just work” has just been released.

I’ve just downloaded the source code from their git repository (git rocks!!) and am trying to see if it’ll install on windows.

Update: It won’t install on windows and there are no plans to ever allow it to (damned Linux elitists!!! :P).

mod_rails released!

Add comment April 11th, 2008

How to use Git on Windows

I’ve been interested in moving to the new Versioning system championed by none other than Linus Torvalds … creator of Linux.

But I’m on a windows box (and I like it here) and didn’t want to deal with using cygwin to manage repositories in Git.

Cue this succinct blog post on how to run Git on windows.

enjoy.

Add comment April 4th, 2008

Getting rid of duplicate Entries in your MySql database

Thanks for Justin Cook for doing all the leg work on this one.

All you have to do is create a new table from the old one, which filters out the duplicate entries

1
2
3
CREATE TABLE new_table AS
SELECT * FROM old_table WHERE 1
GROUP BY [colum_to_remove_duplicates_from];

so as an example

CREATE TABLE news_new AS
SELECT * FROM news WHERE 1 GROUP BY [title]; (more...)

Add comment March 27th, 2008

Problems with PHP4 and PHP5 sessions not working? … you may be using numeric keys!

I have just blown 4 - 5 hours on this “feature” of PHP and I thought someone else would care to know.

You can’t use numeric keys for sessions in php! (more…)

Add comment March 27th, 2008

They’re almost there … Webkit/Safari Nightly scores 95 on Acid 3.

webkit nightly scores 95 on Acid3

Add comment March 25th, 2008

How to run a Webkit Nightly build on windows.

This is very straight forward, but for those who think it might be complicated. Here is all it entails.

inside a webkit nightly build folder (more…)

Add comment March 17th, 2008

Next Posts Previous Posts


Feeds

Calendar

January 2009
S M T W T F S
« Dec    
 123
45678910
11121314151617
18192021222324
25262728293031

Shared Rails Hosting

Recommended