Posts Tagged ‘ruby on rails’

Ruby on Rails 2.0 – Scaffolding is Gone!!!

Friday, May 9th, 2008

Scaffolding is gone? Well… sort of.
In Rails 2.0 the method scaffold is gone from the ActionController::Base so there is no dynamic scaffolding.

So what is a developer to do?
You could uninstall Rails 2.0 and downgrade to an older version of Rails, but what is the fun in that?

Our hats are off to Leonardo Borges for saving us from Rails 2.0 frustration, or worse – starting from scratch.

Now that the dynamic scaffold is gone, we’re left with the static one.
Ok, let’s try it then:

$ script/generate scaffold contact

And it won’t work again! ;) At the end of the output, you will get something like this:

Another migration is already named create_contacts: db/migrate/001_create_contacts.rb

It really means that if your model is meant to be used by a scaffold, you better generate it in the same line. It will fail, afaik, if the model previously existed. Destroy your model and controller, and execute the following:

$ script/generate scaffold Contact name:string email:string

Done! Just run your migrations, startup your server and your new scaffold in rails 2.0 will be working gracefully!

Django and Rails – The Height of Functionality. The Product of Creativity

Tuesday, April 15th, 2008

At Nimbletoad we use Django, built on the Python framework, and Rails, built on Ruby, everyday to speed up web development. While our staff is equally divided between the two framework’s and endless debates ensue as to which is better, no one argues their merit.

Rails and Django, creations of David Heinemeier Hansson and Adrian Holovaty respectively, allow web developers to program and deploy web applications in a fraction of the time.

The key here is that their creations ride on top of existing programming languages. Without them, Web development would still take place. The end results would be the same. However, these two guys saw a way to create frameworks that would further boost functionality.

Functionality is the desired result, While Creativity the guiding force.

Just as David and Adrian stood on Ruby and Python’s shoulders, web development companies such as Nimbletoad stand and build upon the creations of David and Adrian.

Joining the Club – The Web Install Learning Curve

Wednesday, April 9th, 2008

Dramatic recreation of the Web App install learning curve.

1st attempt – WTF errors everywhere

Go to forums. Nothing

“WTF”

Try again.

Reread the install process.

Bang your head and wonder, “why is there not better documentation?”

Swear you’ll post a forum solution, if you can find the answers

Try again

Try again

And Try again

Briefly consider looking at the code

Quit, Start up again.

Suddenly, a Duh moment. The program installs like butter with zero errors.

How quickly we change

Instantly a new mindset – A monkey could do it.

Forums? “Screw it, if these lame asses can’t figure it out, they don’t deserve to run it.”

How quickly we forget.

I’ve been installing web apps for years. Bottom line is they are all quirky. Most installs are 98% frustration and 2% euphoria.

Our goal for Nimbletoad is to reverse this ratio.